.exe file parameters
Moderators: JRL, Dorian (MJT support)
.exe file parameters
Is it possible to pass parameters to the command line for a compiled macro? If so, what's the way to add a short cut to the desktop or elsewhere to run it with parameters on Windows 7? Also, can a compiled macro .exe file be run with the screen locked?
If you were to create a simple script with the one line:Is it possible to pass parameters to the command line for a compiled macro?
Code: Select all
MDL>Parameter_1
Then from a command line run:
Code: Select all
Report_Param.exe /Parameter_1="Some message to be displayed"
Also, can a compiled macro .exe file be run with the screen locked?
Any executable can be run while the screen is locked. However if the executable performs interaction with the screen, none of that interaction will take place. The sample script I just suggested above will run, but the message will not display. If on the other hand we added a line that did a WriteLn> of the parameter value to a file, you would find that the file would exist and would contain the passed parameter value.
Code: Select all
WriteLn>%temp_dir%Record_Param.txt,wres,Parameter_1
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
I am having a rough Monday here...
Report_Param is the single line of code just as JRL suggested:
Running "Report_Param.exe" by itself runs fine and displays "Parameter_1" as expected.
But when I run
"Windows cannot find c:\Users...\Report_Param.exe /Parameter1="some text". Make sure you typed the name correctly and try again.
Suggestions?
Report_Param is the single line of code just as JRL suggested:
Code: Select all
MDL>Parameter_1
But when I run
Code: Select all
Report_Param.exe /Parameter_1="some text"
Suggestions?
in your code:
make the exe
and run command
Report_param.exe /Parameter_1=TEST1 /Parameter_2=TEST2
This works fine like JRL showned
you are assigning the values to the array makes sure in your code its the same array/variable name.
Code: Select all
MDL>Parameter_1
MDL>Parameter_2
make the exe
and run command
Report_param.exe /Parameter_1=TEST1 /Parameter_2=TEST2
This works fine like JRL showned
you are assigning the values to the array makes sure in your code its the same array/variable name.
your run command shows Parameter1, which is not the same as Parameter_1
"Windows cannot find c:\Users...\Report_Param.exe /Parameter1="some text". Make sure you typed the name correctly and try again.
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Good catch hoangvo81 - in my code they are the same - this was something I messed up copying / pasting
Cyber, I have tried quotes in every possible place/combination
I would have sworn I tried this yesterday but I just found that,
RUN>Report_param.exe /Parameter_1=TEST1 works
But EXE>Report_param.exe only works with NO parameters
Thanks for help!
Cyber, I have tried quotes in every possible place/combination
I would have sworn I tried this yesterday but I just found that,
RUN>Report_param.exe /Parameter_1=TEST1 works
But EXE>Report_param.exe only works with NO parameters
Thanks for help!