Sign in to follow this  
Followers 0
dazza

Run & ShellExecute not working...

7 posts in this topic

I am passing the correct file name and path yet (for some reason) the warning 'Cannot find this executable' pops up.

I expect it's priviledges as I am working on secure machines.

Is there a jazzy way of bringing up the Start->Run window so I can pass in the path/exe? I don't really want to use clicks and sends.

Many thanks

Share this post


Link to post
Share on other sites



Run("rundll32.exe shell32.dll,#61")


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

Hi dazza.

Witout src i cannot say where is your prob.

But you can try this ways too:

Run("cmd.exe /c " & """" & "PATH TO YOUR EXE FILE" & """",@ScriptDir,@SW_HIDE)
ShellExecute("""" &"yourfile.exe"& """")

It will solve this problem.

Hope it helps.


[size="5"] [/size]

Share this post


Link to post
Share on other sites

I expect the problem is that you are not using the full path to the executable.

Share this post


Link to post
Share on other sites

Many thanks.

Plenty to work with.

Share this post


Link to post
Share on other sites

Oh, and I hope you're not confusing the working directory parameter as the path to the executable. You need to actually run "C:\Windows\notepad.exe" or whatever the target is.

Share this post


Link to post
Share on other sites

Run("rundll32.exe shell32.dll,#61")

Many thanks Funkey

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