PDA

View Full Version : Force install folder



NewsArchive
08-15-2008, 02:19 AM
Can I force the installer to install to a certain location from the command
line?

I am distributing my app on a flash drive
I need to install the files onto the flash drive before I ship it
so I created an install script that I run that copies all the files to the
flash drive
In my install script that uses the function Get System Information(Installer
Path Name)
so that will return the path of the install location
I use that for the web update

But that is not the location of the flash drive when I copy the files
Can I force the install to o:\mydir when I run the script for me to copy the
files to the flash drive?

something like mysetup.exe o:\myinstall ??????

I hope I explained this ok

--
Eric Jacobowitz
www.castlecomputer.com
www.cctsoftware.com

NewsArchive
08-15-2008, 02:21 AM
Eric,

> Can I force the installer to install to a certain location from the
> command
> line?
>
> I am distributing my app on a flash drive
> I need to install the files onto the flash drive before I ship it
> so I created an install script that I run that copies all the files to the
> flash drive
> In my install script that uses the function Get System
> Information(Installer Path Name)
> so that will return the path of the install location
> I use that for the web update
>
> But that is not the location of the flash drive when I copy the files
> Can I force the install to o:\mydir when I run the script for me to copy
> the files to the flash drive?
>
> something like mysetup.exe o:\myinstall ??????
>
> I hope I explained this ok

Absolutely no problem. I have attached a demo project for you (see attached
..sb6).

I have also attached a source code demo screenshot to show how it works:

1. A new %DESTDIR% variable is defined in line 28. It's an empty variable.

2. Line 31 checks if the %DESTDIR% variable does have a value. If this is
the case, it sets the %_SB_INSTALLDIR% (the variable that holds the
installation folder) to %DESTDIR%.

3. If the variable %DESTDIR% is empty (Line 33) then it uses the standard.
%_SB_INSTALLDIR% is set to the [INSTALLDIR] compiler variable value.

But where does the %DESTDIR% value come form? From the command line!

For example:
forceinstallfolder.exe /V DESTDIR c:\test

This will set the %DESTDIR% variable to c:\test. So the default
installation folder will also be c:\test

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-18-2008, 01:58 AM
works perfectly!
thanks

--
Eric Jacobowitz
www.castlecomputer.com
www.cctsoftware.com