Sign in to follow this  
Followers 0
sanulevan

Why Run Command for certain softwares

4 posts in this topic

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

Share this post


Link to post
Share on other sites



yes,

Global $dir="/SubmitEaze/",$SubmitEaze_exe="SubmitEaze.exe"

If Not ProcessExists($SubmitEaze_exe) Then

ShellExecute(@ProgramFilesDir & $dir & $SubmitEaze_exe,"","","",@SW_SHOWNORMAL)

EndIf

it will works correctly....Why it cannot works using RUN?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


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
Sign in to follow this  
Followers 0