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
- :
- Passing Paths As Arguments to Exe's
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
‎Jun 07, 2011
03:17 PM
Passing Paths As Arguments to Exe's
Hi there,
I have some .exe custom actions that I pass information to via PROPERTIES. In this instance I am passing two paths that may contain spaces.
In the past I have found that if I pass a single property that may include spaces, I have to make the command line on the custom action "[PROPERTY]. Using a double quote at the end will pass into the .exe.
So, like I said I want to pass two. I've tried setting the command line options as
"[PATHPROP1] "[PATHPROP2]
"[PATHPROP1]" "[PATHPROP2]"
What I may try is to pass it as "[PATHPROP1]-[PATHPROP2] to see if I get both paths separated by "-". Then, I can parse it in my custom action .exe.
I would think there is an easier standard for this. Anyone have any ideas.
GREATLY appreciated!!
I have some .exe custom actions that I pass information to via PROPERTIES. In this instance I am passing two paths that may contain spaces.
In the past I have found that if I pass a single property that may include spaces, I have to make the command line on the custom action "[PROPERTY]. Using a double quote at the end will pass into the .exe.
So, like I said I want to pass two. I've tried setting the command line options as
"[PATHPROP1] "[PATHPROP2]
"[PATHPROP1]" "[PATHPROP2]"
What I may try is to pass it as "[PATHPROP1]-[PATHPROP2] to see if I get both paths separated by "-". Then, I can parse it in my custom action .exe.
I would think there is an easier standard for this. Anyone have any ideas.
GREATLY appreciated!!
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 09, 2011
01:50 PM
I just passed it on the command line of the custom action as...
"[PATHPROP1]![[PATHPROP2].
This was then split in the .exe at "!".
"[PATHPROP1]![[PATHPROP2].
This was then split in the .exe at "!".
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 10, 2011
08:07 AM
Hello,
I have a similar CA in my setup.
I am starting exe from [SUPPORTDIR] giving him two paths.
INSTALLDIR is set to c:\temp
SOURCEDIR_DIR is for my purpose defined in Directory Table
1. I must call CA 35:
DirName: SOURCEDIR_DIR
DirValue: [SOURCEDIR]
2. I call CA 98:
Work.Dir: SOURCEDIR_DIR
FName&Cmd:
[SOURCEDIR_DIR]test-Message.exe ?[SOURCEDIR]?[INSTALLDIR]
I am using ? just as a delimiter between two paths.
It does work.
test-Message.exe becomes this command line:
---------------------------
MsgBox
---------------------------
C:\Release 1\DiskImages\Disk1\test-Message.exe?C:\Release 1\DiskImages\Disk1\?C:\temp\CallEXE\
---------------------------
OK
---------------------------
I have a similar CA in my setup.
I am starting exe from [SUPPORTDIR] giving him two paths.
INSTALLDIR is set to c:\temp
SOURCEDIR_DIR is for my purpose defined in Directory Table
1. I must call CA 35:
DirName: SOURCEDIR_DIR
DirValue: [SOURCEDIR]
2. I call CA 98:
Work.Dir: SOURCEDIR_DIR
FName&Cmd:
[SOURCEDIR_DIR]test-Message.exe ?[SOURCEDIR]?[INSTALLDIR]
I am using ? just as a delimiter between two paths.
It does work.
test-Message.exe becomes this command line:
---------------------------
MsgBox
---------------------------
C:\Release 1\DiskImages\Disk1\test-Message.exe?C:\Release 1\DiskImages\Disk1\?C:\temp\CallEXE\
---------------------------
OK
---------------------------
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 10, 2011
08:14 AM
A good point with the seperator. I was using "!" thinking that was an illegal character for directory naming, but it isn't.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)