View Full Version : Getting the path of the source files?
Mattis
11-03-2008, 10:29 AM
If trying to run a Lua-Script that should install IIS 6.0 and need to get the path of the source file, but have no luck figuring it out.
this is my code:
result = File.Run("Sysocmgr.exe", "/i:sysoc.inf /u:".._SourceDrive.."\\IIS6.0\\IIS_Unattended.txt", , SW_SHOWNORMAL, true)
In the argument part I'm trying to get the SourceDir and concatenate it with the script file that needs to be run.
How do I get the Path to the Source dir??? :huh
venky
11-03-2008, 05:30 PM
Mattis,
You need have "" for working folder argument. See bolded text below for corrected code. See below for correct code:
result = File.Run("Sysocmgr.exe", "/i:sysoc.inf /u:".._SourceDrive.."\\IIS6.0\\IIS_Unattended.txt ", "", SW_SHOWNORMAL, true)
This should work.
Venky.
Mattis
11-05-2008, 04:51 AM
Hi Venky,
Thanks for you reply, the problem is not actually the "" for the working folder, there is a default parameter value for that.
The problem in my example is that I cannot seem to find a variable in MSI Factory that gives me the full path to the source directory of the installation.
The variable _SourceDrive only gives med the drivename: c:\
Is there a "global"-variable to get the full path or how do you access the Folders-collection?
Or can this be done in some way other way by code?
jassing
11-05-2008, 11:50 AM
The variable _SourceDrive only gives med the drivename: c:\
Is there a "global"-variable to get the full path or how do you access the Folders-collection?
I have made a request to IR that there be a _SourceFolder and _SourceFile for other tools (currently; those two exist in SUF). I think if it comes from more than one person; it may get done in an update rather than "we'll think about it".
Mattis
11-05-2008, 04:07 PM
Yes I have been using them in SUF and found it very hard to belive when they were not supported in MSI Factory.
Is there any way to get the same results by writing some more code in Lua, or any other way maybe enumerate the Folder-Collection?
Thanks,
Mattias
venky
11-05-2008, 05:35 PM
If you are using a bootstrapper you could use _SourceFolder which is a global variable or you could use MSI.GetProductInfo and use the InstallSource property.
Venky.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.