Jump to content
Sign in to follow this  
SpecialK

How to get the Filepath from a superior Program?

Recommended Posts

SpecialK

Hello,

i want to start the script2.exe from the file script1.exe.

For example:

script1:

Run (C:\Script2.exe)oÝ÷ Ù'+vjëh×6msgbox (1, "Test", "Script1 is located in ????")

I ask myself how i can get the file location from script1 which starts script2. I need the Filepath and the filename for another script which will start a special command which needs the filename.

Thank you in advace

SpecialK

Share this post


Link to post
Share on other sites
99ojo

See help command line parameter.

;-))

Stefan

Share this post


Link to post
Share on other sites
dbzfanatic

Pass it as a parameter.

Script 1:

Run("C:\Script2.exe /" & @ScriptFullPath)

Script 2:

If $cmdline[0] <> "" Then
If $cmdline[1] <> "" Then
MsgBox(1,"Test","Script 1 is located in: " & $cmdline[1])
Endif
Endif

Share this post


Link to post
Share on other sites
SpecialK

There is one problem: I don't have the change to edit script1.

EDIT: I was too quick :P It works fine without editing the firt program.

Thank you

SpecialK

Edited by SpecialK

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.