Got stuck while trying to get a Wise Installer application to perform a silent install into the directory of my choice.
First I tried to change the programfiles variable by using:
set programfiles=X:\Program Files\CustomDir
This trick didn't work for the Wise Installer but the next one did
So far I have been using this for WinRAR and QuickPar.
Start Notepad and copy and paste the following code into it:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion] "ProgramFilesDir"="C:\\Program Files"
Save this as progfiles.reg in the root of your $OEM$\$1\Install directory.
Now you have a reg file with the default location of the Program Files directory.
Next we're going to customize this:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion] "ProgramFilesDir"="C:\\Program Files\\Tools Compression"
Save this as progfilestmp.reg in the root of your $OEM$\$1\Install directory.
In the example of WinRAR the code in my startup.cmd would look like this:
ECHO. ECHO Installing WinRAR 3.40 ECHO Please wait... regedit /s %systemdrive%\install\progfilestmp.reg start /wait %systemdrive%\install\Applications\ToolsCompression\WinRAR34\wrar340.exe /s regedit /s %systemdrive%\install\progfiles.reg Echo Moving WinRar Start Menu Items and Shortcuts move "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\WinRar" "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\Tools Compression" DEL /Q "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\WinRar" RD "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\WinRar"
This installs WinRAR into the Directory I specified in progfilestmp.reg and also moves the Start Menu shortcuts to the directory of my choice.
I think this might be usefull, for me it is anyway



Help
Back to top









