MSI Launch Directory
-
I am writing an installer class for a custom action...there are certain files contained in the same directory as the executable installer(ie the msi) that i need access to, however when you launch an msi it in return launches a program located here C:\WINDOWS\system32\msiexec.exe when you try to user the current directory .\\somefile.extension you end up getting an error saying it couldnt find the file at C:\WINDOWS\system32\somefile.extension... The question is, does anyone know how to get the directory that the msi was launched from? Any help at all would be great. Thanks everyone.
-- "Keyboard not found. Press < F1 > to RESUME. " Source unknown (appears in many common BIOSes as a real error message)
-
I am writing an installer class for a custom action...there are certain files contained in the same directory as the executable installer(ie the msi) that i need access to, however when you launch an msi it in return launches a program located here C:\WINDOWS\system32\msiexec.exe when you try to user the current directory .\\somefile.extension you end up getting an error saying it couldnt find the file at C:\WINDOWS\system32\somefile.extension... The question is, does anyone know how to get the directory that the msi was launched from? Any help at all would be great. Thanks everyone.
-- "Keyboard not found. Press < F1 > to RESUME. " Source unknown (appears in many common BIOSes as a real error message)
Normally, you don't. Everything you would normally need should be in the installer. Any custom actions will know the references to files inside the installer, where they are unpacked, and at which time custom actions are OK to run.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...