Jump to content

How to get the Filepath from a superior Program?


 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...