Installshield silent msi install
I have created an msi install using IS express and am having issues when running it. If i run it with the full UI it is all fine. But if i try and run silently then the %ALLUSERSPROFILE% variable does not seem to contain the correct path and all the files go into 'c:\application data\all users' instead of 'c:\documents and settings\application data\all users'. This applies to registy entries and files. The msiexec is version 2.00 which i cant really upgrade. The command line i am using is 'msiexec.exe /i test.msi'.
I have generated a log of the install and can see some odd things like:
MSI (s) (80:F8): Dir (target): Key: ALLUSERSPROFILE , Object: C:\
MSI (s) (80:F8): Dir (target): Key: APPLICATION_DATA , Object: C:\Application Data\
MSI (s) (80:F8): Dir (target): Key: KAL1 , Object: C:\Application Data\KAL\
MSI (s) (80:F8): Dir (target): Key: KALIGNITE1 , Object: C:\Application Data\KAL\Kalignite\
MSI (s) (80:F8): Dir (target): Key: INTERNAL , Object: C:\Application Data\KAL\Kalignite\Internal\
MSI (s) (80:F8): Dir (target): Key: STATUS , Object: C:\Application Data\KAL\Kalignite\Internal\Status\
MSI (s) (80:F8): Dir (target): Key: SPSTATUS , Object: C:\Application Data\KAL\Kalignite\Internal\SPStatus\
It seems to have the wrong value for %ALLUSERSPROFILE% but i cant see why.
Any suggestions would be much appreciated.
Thanks.
I have generated a log of the install and can see some odd things like:
MSI (s) (80:F8): Dir (target): Key: ALLUSERSPROFILE , Object: C:\
MSI (s) (80:F8): Dir (target): Key: APPLICATION_DATA , Object: C:\Application Data\
MSI (s) (80:F8): Dir (target): Key: KAL1 , Object: C:\Application Data\KAL\
MSI (s) (80:F8): Dir (target): Key: KALIGNITE1 , Object: C:\Application Data\KAL\Kalignite\
MSI (s) (80:F8): Dir (target): Key: INTERNAL , Object: C:\Application Data\KAL\Kalignite\Internal\
MSI (s) (80:F8): Dir (target): Key: STATUS , Object: C:\Application Data\KAL\Kalignite\Internal\Status\
MSI (s) (80:F8): Dir (target): Key: SPSTATUS , Object: C:\Application Data\KAL\Kalignite\Internal\SPStatus\
It seems to have the wrong value for %ALLUSERSPROFILE% but i cant see why.
Any suggestions would be much appreciated.
Thanks.
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
Posted by:
nheim
16 years ago
Hi Andy,
you can see in the log that the 'ALLUSERSPROFILE' property is "C:\"
This is the inital setting, as 'ALLUSERSPROFILE' is pointing to 'TARGETDIR'
For this to work, you need a Custom Action type 51, which sets the 'ALLUSERSPROFILE' property to the %ALLUSERS% variable.
Then you need to place this CA between 'CostInitialize' and 'CostFinalize' in both 'Install...' sequence tables.
But far easier would be, to use the built in mechanism for this, which actually would be, to use the 'CommonAppDataFolder' property.
This is gets automatically resolved to "%ALLUSERSPROFILE%\AllUsers\Application Data"
Regards, Nick
you can see in the log that the 'ALLUSERSPROFILE' property is "C:\"
This is the inital setting, as 'ALLUSERSPROFILE' is pointing to 'TARGETDIR'
For this to work, you need a Custom Action type 51, which sets the 'ALLUSERSPROFILE' property to the %ALLUSERS% variable.
Then you need to place this CA between 'CostInitialize' and 'CostFinalize' in both 'Install...' sequence tables.
But far easier would be, to use the built in mechanism for this, which actually would be, to use the 'CommonAppDataFolder' property.
This is gets automatically resolved to "%ALLUSERSPROFILE%\AllUsers\Application Data"
Regards, Nick
Posted by:
andymitchell
16 years ago
Thanks for your replies. I cant find an easy way to add the necessary Custom Action 51 in IS Express, i can see it in Pro v12 but this is for an existing install so it must be the express version. I have found an even easier way, which is to pass the folder path as a command line setting.
e.g. msiexec.exe /i test.msi /q ALLUSERSPROFILE="%ALLUSERSPROFILE%"
This seems to work fine.
Thanks for the help.
Andy
e.g. msiexec.exe /i test.msi /q ALLUSERSPROFILE="%ALLUSERSPROFILE%"
This seems to work fine.
Thanks for the help.
Andy
Posted by:
andymitchell
16 years ago
New problem, things are never simple!!!!
The installers are actually packaged as a single .exe and i am struggling to pass the 2 parameters through to the msi installer. I have tried setup.exe /s /v/qnALLUSERSPROFILE="%ALLUSERSPROFILE%" but the msi installer needs a space after the /qn parameter. However the IS .exe only passes through parameters after the /v until a space is reached so i cannot insert the space that i need. I have read that you can put quotes around the whole string to be passed to the msi installer, but only if the path has no spaces e.g. setup.exe /s /v"/qnALLUSERSPROFILE=%ALLUSERSPROFILE%", but as %ALLUSERSPROFILE% expands to a long filename i cant use this method.
Thanks in advance for any replies.
Andy
The installers are actually packaged as a single .exe and i am struggling to pass the 2 parameters through to the msi installer. I have tried setup.exe /s /v/qnALLUSERSPROFILE="%ALLUSERSPROFILE%" but the msi installer needs a space after the /qn parameter. However the IS .exe only passes through parameters after the /v until a space is reached so i cannot insert the space that i need. I have read that you can put quotes around the whole string to be passed to the msi installer, but only if the path has no spaces e.g. setup.exe /s /v"/qnALLUSERSPROFILE=%ALLUSERSPROFILE%", but as %ALLUSERSPROFILE% expands to a long filename i cant use this method.
Thanks in advance for any replies.
Andy
Posted by:
nheim
16 years ago
Posted by:
turbokitty
16 years ago
Posted by:
andymitchell
16 years ago
Posted by:
nheim
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.