Execute Program Parameters
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Execute Program Parameters
Any way to EXECUTE PROGRAM from a process and pass parameters? Want to launch a batch (CMD) file and pass parameters from BO. Also, does the Execute Program understand UNC file paths?
Re: Execute Program Parameters
I have used something like the following:
Inside the command file the parameters are referenced as %1 and %2
Code: Select all
EXECUTE PROGRAM 'C:\FullPath\commandFile.cmd '+BO.attr1+' '+BO.attr2
Bob
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Re: Execute Program Parameters
Anything I put after 'C:\FullPath\commandFile.cmd ' results in syntax error for action'
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Re: Execute Program Parameters
Actually its the double quotes. I need to surround the BO's with double-quotes,
-
- Posts: 139
- Joined: Sat Feb 10, 2018 12:56 am
Re: Execute Program Parameters
I found by setting a System Settings attribute to a quote, you can concatenate on the Action Line.
SystemSetting.DQ = "
Action 1 =
EXECUTE PROGRAM '\\Server\Folder\Batch.CMD' + SystemSettings.DQ + BO.Attribute1 + SystemSettings.DQ
SystemSetting.DQ = "
Action 1 =
EXECUTE PROGRAM '\\Server\Folder\Batch.CMD' + SystemSettings.DQ + BO.Attribute1 + SystemSettings.DQ
Re: Execute Program Parameters
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL