Marcus
Greetings.
I´m trying run this code and keeping an error message:
Windows can´t locate ver_1.part1.exe .
Change Directory>C:\Temp\
Let>rarexe=ver_1.part1.exe
Run Program>%rarexe% -s2
Did try too:
Run Program>C:\Temp\ver_1.part1.exe -s2
and other variants.
Please, may you help me on this issue ?
Papi
Run program using a parameter
Moderators: Dorian (MJT support), JRL
ExecuteFile
If you want to pass parameters, check into ExecuteFile>
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Yes "." is now a valid multi-character in file and directory names. Whatever characters follow the last dot are used to associate the file to its appropriate application. In the ancient DOS 8.3 format the character limit after a dot was 3. Since Win95 that is no longer true. For example a file ending in .HTML (four characters) will probably open in your default browser.
Compile the following and pass all the -parameters you want.
[code]
///This will only work when compiled
Separate>%command_line%,-,par
If>par_countpar_2=None
EndIf
If>par_count=2,OnlyOne
If>par_count>2
Sub>par_count,1
Let>kk=2
Repeat>kk
Add>kk,1
Let>value=par_%kk%
Concat>par_2,%space%%value%
Until>kk>par_Count
EndIf
Label>OnlyOne
Dialog>Dialog1
Caption=Dialog1
Width=305
Height=145
Top=342
Left=373
Button=Ok,112,64,75,25,3
Label=Parameter passed was %par_2%,80,24
EndDialog>Dialog1
show>dialog1,res1
Label>EOF
[/code]
Disabled HTML
Compile the following and pass all the -parameters you want.
[code]
///This will only work when compiled
Separate>%command_line%,-,par
If>par_countpar_2=None
EndIf
If>par_count=2,OnlyOne
If>par_count>2
Sub>par_count,1
Let>kk=2
Repeat>kk
Add>kk,1
Let>value=par_%kk%
Concat>par_2,%space%%value%
Until>kk>par_Count
EndIf
Label>OnlyOne
Dialog>Dialog1
Caption=Dialog1
Width=305
Height=145
Top=342
Left=373
Button=Ok,112,64,75,25,3
Label=Parameter passed was %par_2%,80,24
EndDialog>Dialog1
show>dialog1,res1
Label>EOF
[/code]
Disabled HTML
Last edited by JRL on Wed Feb 13, 2008 6:52 am, edited 4 times in total.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Aaargh! thanks for that reminder about extensions.
I knew that! But old work habits are hard to break. I am still supporting WIN9x clients every day.
Don't see how compiling has an effect, unless you were just trying to create an EXE with that name.
Re the message:
Be sure the script does not have a trailing space.
I knew that! But old work habits are hard to break. I am still supporting WIN9x clients every day.
Don't see how compiling has an effect, unless you were just trying to create an EXE with that name.
Re the message:
Is there a trailing space after the ".exe", or is that just a typo here?Windows can´t locate ver_1.part1.exe .
Be sure the script does not have a trailing space.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Yes trying to use an exe with that name but also compiling has an effect. If you don't compile, the Command_line variable will not be the file name with the parameters.Don't see how compiling has an effect, unless you were just trying to create an EXE with that name.
Papi,
I tried running your code with my previously posted script compiled and named to your file name and had a failure as well. I experienced your error message however, only when I specified an incorrect path to the file.
Disregard the text in yellow below. The problem was my script (above) was poorly written. It went into a continuous loop. I've altered the script and it now works correctly. Parameters will pass to it when using the code and file name supplied by Papi.
Otherwise what I saw was that the compiled script would run but the dialog would never display. I also renamed the exe to ver.exe and still failed to display the dialog. Also changed the first line of the script so that the parameter modifier was a "/" rather than a "-" and still I get the same failure of the dialog to display. With no parameters the dialog displays as expected.
Hope this isn't too confusing. Its getting late and I tend to meander....
Run program using a parameter
All.
Thanks for atention. Using Winrar to split compacted files.
I did set Winrar at other way and -s2 is unnecessary now.
Cordially.
Papi
Thanks for atention. Using Winrar to split compacted files.
I did set Winrar at other way and -s2 is unnecessary now.
Cordially.
Papi
JRL wrote:Yes trying to use an exe with that name but also compiling has an effect. If you don't compile, the Command_line variable will not be the file name with the parameters.Don't see how compiling has an effect, unless you were just trying to create an EXE with that name.
Papi,
I tried running your code with my previously posted script compiled and named to your file name and had a failure as well. I experienced your error message however, only when I specified an incorrect path to the file.
Disregard the text in yellow below. The problem was my script (above) was poorly written. It went into a continuous loop. I've altered the script and it now works correctly. Parameters will pass to it when using the code and file name supplied by Papi.
Otherwise what I saw was that the compiled script would run but the dialog would never display. I also renamed the exe to ver.exe and still failed to display the dialog. Also changed the first line of the script so that the parameter modifier was a "/" rather than a "-" and still I get the same failure of the dialog to display. With no parameters the dialog displays as expected.
Hope this isn't too confusing. Its getting late and I tend to meander....
Papi