Jump to content

Recommended Posts

Posted

I am trying to run .exe file from a network folder. but not getting any response.

Also tried with mapping the drive.

using below code.

Method 1 :

Run("\\.exe path")

Method 2 :

$result = FileExists("\\.exe path")
If $result Then
Msgbox(0,"","File exists")
Run("\\.exe path")
Else
Msgbox(0,"","File doesn't exist")
EndIf

Method 3:
DriveMapAdd("X:", "\\ path")
RunAs("X:\.exe")

 

Thanks

Sud

Posted

Hi.

 

This should give you a start:

 

$Exe="\\server\share\notepad.exe"


if FileExists($Exe) Then
    $PID=run($Exe,@TempDir)
    MsgBox(0,"EXE File found","The Program " & $Exe & " has been started with PID=" & $PID)
Else
    MsgBox(48,"EXE not found","The Program " & $Exe & " doesn't seem to exist. (missing rights?)")
EndIf

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted

Hi rudi, thanks for your inputs.

i have tried the same and the msg is displaying that program has been started with PID but  .exe is still not executing.

Posted (edited)

Maybe something with admin rights? Do you have #requireadmin in your script?

@edit:

Have you tried to start it manually - doest it work ?
Try shellexecute instead of RUN.

Edited by Juvigy
spel check

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