cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Superfreak3
Level 11

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!!
Labels (1)
0 Kudos
(3) Replies
Superfreak3
Level 11

I just passed it on the command line of the custom action as...

"[PATHPROP1]![[PATHPROP2].

This was then split in the .exe at "!".
0 Kudos
Roman1
Level 9

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
---------------------------
0 Kudos
Superfreak3
Level 11

A good point with the seperator. I was using "!" thinking that was an illegal character for directory naming, but it isn't.
0 Kudos