Sign in to follow this  
Followers 0
Dicer

Application won't run

5 posts in this topic

I have a file here C:\Program Files\ECN\ECC.exe

I have tried

Run("C:\Program Files\ECN\ECC.exe") but nothing happens.

Doubleclicking it normally ofcourse does it.

Is there a fast way to automate (invisible to user) the process of actually "physically" open that directory and have the Mouseclick function doubleclick it?

Share this post


Link to post
Share on other sites



Try

$a = FileGetShortName("C:\Program Files\ECN\ECC.exe")
Run($a)


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

this will search "ECC.exe" on all "Fixed" drivers.

and run it --

_FileSearchToRun('ECC.exe', '/s -y -a -x')

Func _FileSearchToRun($filename, $parameters = '')
    ; Searches for a filename on every fixed drive. Returns the pid.
    Local Const $IDYES = 6
    Local $data, $split, $pid
    Local $drive = DriveGetDrive('FIXED')
    If Not @error Then
        For $i = 1 To UBound($drive) -1
            $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2)
            Do
                $data &= StdOutRead($pid)
            Until @error
        Next
    Else
        Return SetError(2, 0, 0)
    EndIf
    $split = StringSplit(StringStripWS($data, 3), @CRLF, 1)
    If Not @error Then
        For $i = 1 To $split[0]
            If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then
                Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE)
            EndIf
        Next
    Else
        Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE)
    EndIf
    Return SetError(1, 0, 0)
EndFunc

-Ace Loc


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

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