This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Basic MSI Project - Current directory
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2008
10:07 AM
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!
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!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2008
12:47 PM
Depending on your build settings, perhaps reading SETUPEXEDIR using Session.Property will return the directory you want?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2008
12:50 PM
Thanks Robert, I will try that!