MSFN Forum: Install applications in any directory you want - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Install applications in any directory you want Rate Topic: -----

#1 User is offline   khadgar 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 20-September 04

Posted 20 September 2004 - 06:25 PM

Install applications in any directory you want

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 :lol:
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 ;)


#2 User is offline   sleepnmojo 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 472
  • Joined: 02-March 04

Posted 20 September 2004 - 06:53 PM

You can use CommonFilesDir for the common files directory.

Also rather than using the registry files, stick with REG.EXE. Would be a little cleaner here, IMHO.

#3 User is offline   Nologic 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 461
  • Joined: 07-October 03

Posted 20 September 2004 - 08:46 PM

Well I've started to do some thing of the sort with my AutoIt scripts....tho I'm just setting its install path if allowed by the installing app....some don't give you this option...so maybe in some corner cases I'll see about applying your idea. :)

Any ways good post :)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy