PDA

View Full Version : running a msi file from Setup Factory


codge
03-08-2006, 06:42 AM
Hi, I've tried finding out how to run an msi file on pre-install and I'm getting no-where fast. I've lloked at the examples given in the various forums but I must be missing something.

If I type this in at the run prompt it works but it must be in this syntax

msiexec.exe /i "c:\program\vfpodbc.msi"

I've tried various combinations in the actions, the latest being

File.Run("%windir%..\\system32\\msiexec.exe /i", "c:\\program\\vfpodbc.msi","",sw_shownormal,true)

but it doesn't run the msi file, just seems to ignore it and continues with the installation but yet if I get the syntax wrong it gives me an error

Help

codge
03-08-2006, 08:13 AM
Hi, I did another trawl through the forum and finally came up with a solution, thanks to Absynthe who posted on an earlier thread

File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe"), "/i \""..SessionVar.Expand("%AppFolder%\\Support\\msxml.msi").."\"","", SW_SHOWNORMAL, true);

Now working fine, many thanks