Jump to content

run not working with @ScriptDir


botanic
 Share

Go to solution Solved by botanic,

Recommended Posts

I have the following code

$PID = Run(@ComSpec & " /k " & @ScriptDir & "\" & $ConsoleCLI & ">" & $logfile, "")

The @ScriptDir is "C:Program Files (x86)test"

however when it tries to run i get the following error

 

'C:Program' is not recognized as an internal or external command,
operable program or batch file.
 

 

If anyone can help with why this isnt working, thanks a ton!

I printed the whole string and it comes out to

 

C:Windowssystem32cmd.exe /k C:Program Files (x86)testtest.exe >C:ProgramDatatestout.log

Edited by botanic
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...