
ttene1.5524949174526318E12 asked a question.
Basic MSI Project - Current directory
Hello all.
I am trying to run an executable which will be plcaed inside a directory. That directory resides near the setup.exe file in the same Disk1 directory in the Release.
For that, I tried to write a vbscript code as follows:
----------------------------------------------------
dim filesys, newfolder
set filesys=CreateObject("Scripting.FileSystemObject")
If not filesys.FolderExists("my dir path") Then
sCurPath = filesys.GetAbsolutePathName(".")
sCurPath = sCurPath + "my exe path"
'In case of spaces in path, add one/two/three ??? inverted commas at both sides of the path :
sCurPath = Chr(34) & sCurPath & Chr(34)
Set wshShell = CreateObject ("WScript.Shell")
If isnull(wshShell) Then
MsgBox "Error installing shell"
End If
wshShell.run sCurPath
End If
-----------------------------------------------------
I thought that GetAbsolutePathName will do the trick but it returned me win\sytem32 path...
Also, the current project is built on Document and Settings\blablabla.. so it definitely may have some spaces in the path!
Any advice?
Many thanks!