Jump to content

Windows Installer switches for target dir


REDONDOS

Recommended Posts

Well, that's the question. I'd like to install -for example- Nero Burning Rom into:

"C:\Program Files\CD Burning\Ahead\Nero"

or ACDSee into:

"C:\Program Files\Multimedia\ACD Systems"

How can I accomplish this task?

I've searched through the forum but found nothing but switches for the automation process, there is no information regarding changing the default path for the installation.

I guess that creating a .iss file for InstallShield installations would respect the folder I chose at the time of the .iss creation, but what about Windows Installer, NSIS, WISE and Inno?

Thanks in advance. :)

Link to comment
Share on other sites


MSI:

start /wait msiexec /i %systemdrive%\install\apps\ms\bootvis.msi /qb INSTALLDIR=D:\Prgramme\MSN

or:

start /wait %systemdrive%\install\apps\ms\bootvis.msi /qb INSTALLDIR=D:\Prgramme\MSN

----------------------------------------------------------------------------------------------

Inno:

start /wait %systemdrive%\install\apps\hase\setup.exe /SILENT /DIR="D:\Programme\Hase"

or:

start /wait %systemdrive%\install\apps\hase\setup.exe /VERYSILENT /DIR="D:\Programme\Hase"

----------------------------------------------------------------------------------------------

NSIS:

start /wait %systemdrive%\install\apps\hase\setup.exe /S /D=D:\Programme2\Hase

----------------------------------------------------------------------------------------------

Wise:

start /wait %systemdrive%\install\apps\hase\setup.exe /S /X D:\Programme2\Hase

pastl

Link to comment
Share on other sites

Very usefull information. Thanks.

My question is how to install to %systemDrive% ? Right now my line is

REG ADD %KEY%\001 /V 1 /D "%CDROM%\PowerTools\jv16pt_setup.exe /VERYSILENT /SP- /DIR=c:\UTILITIES\PowerTools" /f

I would like

REG ADD %KEY%\001 /V 1 /D "%CDROM%\PowerTools\jv16pt_setup.exe /VERYSILENT /SP- /DIR=%systemdrive%:\UTILITIES\PowerTools" /f

What am I forgetting?

This is all new to me, and a little mind boggling.

Thanks again

Link to comment
Share on other sites

the quotes for the path

REG ADD %KEY%\001 /V 1 /D "%CDROM%\PowerTools\jv16pt_setup.exe /VERYSILENT /SP- /DIR=\"%systemdrive%:\UTILITIES\PowerTools\"" /f

\" is just because you're iusing REG, and without the \ it wouldn't read the line correctly with the embedded quotes.

Link to comment
Share on other sites

  • 2 weeks later...

But what if we are passing them onto MSI? The quotation marks seem to mess it up.

start /wait AdbeRdr60_enu_basic.exe -p"-s /v\"/qn INSTALLDIR="c:\Progs\Media\Adobe\Acrobat 6.0"""

Doesnt work. Maybe I should extract the MSI? know how to do that?

Link to comment
Share on other sites

wamatt:

Sorry for not replying earlier.

The trick is that if you need to pass any switches to msiexec, you have to "escape" them. That means use backslashes.

For example, for the line you needed:

start /wait AdbeRdr60_enu_basic.exe -p"-s /v\"/qn INSTALLDIR=\"c:\Progs\Media\Adobe\Acrobat 6.0\"\""

See that I escaped every set of double quotes except the first and the last ones?

And if you need that inside your RunOnceEx.cmd file:

REG ADD %KEY%\001 /VE /D "Adobe Acrobat Reader 6" /f
REG ADD %KEY%\001 /V 1 /D "start /wait AdbeRdr60_enu_basic.exe -p\"-s /v\"/qn INSTALLDIR=\"c:\Progs\Media\Adobe\Acrobat 6.0\"\"\""

That is, of course, escape another set of double quotes since you need to enclose the line you need to install the program between "s.

Another example would be what I actually use and works for Diskeeper 8:

REG ADD %KEY%\002 /VE /D "Diskeeper 8" /f
REG ADD %KEY%\002 /V 1 /D "%SYSTEMDRIVE%\Applications\diskeeper\setup.exe /s /v\"/qn INSTALLDIR=\\\"%PROGRAMFILES%\System\Hard Drive Tools\Diskeeper\\\"\"" /f

pastl (or anyone willing to help, actually):

Your tips were very useful, thanks a lot for them. The only problem I am having is that none of the installation programs made with Wise installer seem to like the /X switch.

For example, Opera 7.51 just won't install if I use /X. Instead, the installer extracts the installation files to the directory of my choice but never actually installs the software.

In fact, after reading Wise KB Article #564 I found out the following:

/X pathname -- extracts files into pathname

So I guess that Wise just doesn't have a switch for installing to an alternative directory, and that's why I just repacked the applications that use it and well, it seems that they work.

Anyway, if anybody of you does know how to make Wise Installer install an application to a directory other than the default, please post your comments.

Link to comment
Share on other sites

Thanks REDONOS - however it doesn work :)

C:\Temp>start /wait AdbeRdr60_enu_basic.exe -p"-s /v\"/qn INSTALLDIR=\"c:\Progs\Media\Adobe\Acrobat 6.0\"\""

Justs sits there for a while then returns to the prompt - no error or anything, but its just not installed.

If I take out the \" and the space it installs fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...