Jump to content

Problems Issuing Run Cmd


Guest Bazza
 Share

Recommended Posts

Guest Bazza

I'm new to AutoIt v3 and I'm trying to run a complied script utilising the RunAsSet / Run cmds to execute a pgm using a Admin A/C on WinXP Pro.

The pgm shortcut (will probably wrap) :

"D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin\Browser.exe" -s"dugout:///dugout_home.html" -p"3420" -l"enu"

Startup Dir :

"D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin"

So I tried the following Run cmd :

Run("D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin\Browser.exe" -s"dugout:///dugout_home.html" -p"3420" -l"enu", "D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin")

It fails with Unknown Function name.

It seems to fail on the '-' immediately after pgm ( ...\Browser.exe -s...).

How to I get the above to work correctly?

TIA

Barry...

Link to comment
Share on other sites

Do you need all those quotes? If so your missing double quotes...Try this....

Run("""D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin\Browser.exe"" -s""dugout:///dugout_home.html"" -p""3420"" -l""enu""", "D:\Program Files\Hewlett-Packard\HP Deskjet Assistant\Bin")
Link to comment
Share on other sites

Guest Bazza

Thanks, worked AOK.

I did try both adding extra quotes and/or removing some before posting here. What I didn't try was putting quotes around the quotes !!!

Thanks very muchly

Barry...

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...