Jump to content

Why Run Command for certain softwares


Recommended Posts

Hi,

i use Run("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ") for running chrome installed at

C:\Program Files (x86)\Google\Chrome\Application.....This will works correctly

But the software submiteaze does not runs this type of code installed at C:\Program Files (x86)\submiteaze\

Run("C:\Program Files (x86)\submiteaze\SubmitEaze.exe") code shows no error but submit is not runs WHY?

pleaese help..

Link to post
Share on other sites

Hi,

Try quoting your path:

Func RunRegardless($1, $2 = "", $3 = Default, $4 = Default)
   Local $FilePath = $1, $wd = $2

   If StringInStr($1, " ") Then $FilePath = '"' & $1 & '"'
   If StringInStr($2, " ") Then $wd = '"' & $2 & '"'
   Return Run($FilePath, $wd, $3, $4)
EndFunc

edit: changed "" to Default for params 3 and 4 ...

edit2: added auto-quoting for working dir as well.

Edited by whim
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...