Some time ago I wrote instructions how to increase space on C drive by moving Windows system folders to D drive and creating junction link (see How to free space on OS Windows drive by moving SoftwareDistribution folder to another disk via junction folder). It works but there may be side effects if you will also move C:/Windows/Installer folder: one of known issue is that after that some (not all) installations from msi files won't work. E.g. I faced with the following error when tried to installed NodeJS:
The system cannot open the device or file specified
One solution which you may try is the following:
- Remove junction link for C:\Windows\Installer folder (but keep actual folder which contains files on D drive!) and create normal folder C:\Windows\Installer (it will be empty)
- Run installer - it should work without errors and should put sub folders of new installation into C:\Windows\Installer
- After installation move sub folders from C:\Windows\Installer to Installer on D drive
- Delete C:\Windows\Installer folder
- Create junction link again
If it won't help try to repeat these steps also for SoftwareDistribution folder (if junction was created for C:/Windows/SoftwareDistribution as well).
However there is simpler way to avoid mentioned error: run installer in silent mode from PowerShell. I found useful script which does it here. Will post it here in case link won't be available:
$fileName = "..." $DataStamp = get-date -Format yyyyMMddTHHmmss $logFile = '{0}-{1}.log' -f $fileName,$DataStamp $MSIArguments = @( "/i" ('"{0}"' -f $fileName) "/qn" "/norestart" "/L*v" $logFile ) Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow
Before to run it put full path to your msi file into $fileName variable. Script will run installer in silent mode and will write all steps into log file so you may check results. After that program should appear in the list of installed apps in Control panel > Programs and features.
No comments:
Post a Comment