Jump to content

Command line with spaces in the path


EndFunc
 Share

Recommended Posts

I'm pulling my hair out. This is one of the most problematic things for me is escaping commandline stuff with autoit. Anyway, I keep trying to run this command for back up scheduling and it doesn't recognize my quotes. Unfortunately the path has a space. 

What exactly am I doing wrong?

$iSched = RunWait(@ComSpec & ' /k ' & '"D:\program files\tivoli\tsm\baclient\dsmcutil" inst scheduler /name:"ADSM Scheduler" /node:' & @ComputerName & ' /clientdir:"D:\Program Files\Tivoli\TSM\baclient" /optfile:"D:\program files\tivoli\tsm\baclient\dsm.opt" /password:' & @ComputerName & ' /validate:yes /autostart:yes /startnow:yes', "", @SW_SHOW)

 I get this error.

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

 

EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

Nevermind I was able to get it to work using the "Working directory" parameter of runwait. 

$iSched = RunWait(@ComSpec & ' /k ' & 'dsmcutil.exe inst scheduler /name:"ADSM Scheduler" /node:' & @ComputerName & ' /clientdir:"D:\Program Files\Tivoli\TSM\baclient" /optfile:"D:\program files\tivoli\tsm\baclient\dsm.opt" /password:' & @ComputerName & ' /validate:yes /autostart:yes /startnow:yes', "D:\program files\tivoli\tsm\baclient", @SW_SHOW)
Edited by EndFunc
EndFuncAutoIt is the shiznit. I love it.
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...