Jump to content

I got a "Run ()" Error , about to run "file.lnk" , Help me


Recommended Posts

Global $abc

$abc = 'C:\aaa\bbb\ddd\'

run ( @ComSpec & "/c" & $abc & "file.lnk","", @SW_HIDE )

when i was run this scrip

it show me a message is ===> Error: Unable to execute the external program

so, could some kind man give me a hand , plz tell me why?

and how to make it work?

I will thank with you very much

Link to comment
Share on other sites

Use ShellExecute() for shortcuts.

However, if you want to do it your way, make sure to add spaces before and after \c. Like this:

run ( @ComSpec & " /c " & $abc & "file.lnk","", @SW_HIDE )
YES~~Your way is right way , and thank you ,

but why need to add spaces before and after \c

but however i still will thank you very much

Link to comment
Share on other sites

Try this:

Go to Start-->Run and type: cmd.exe /c ipconfig

See what happens.

Then this: cmd.exe/cipconfig -->'Cannot find external program' :)

Get it? ^_^

-edit-

Were you trying to point out my typo with a stupid joke? :) You still got it, right?

Edited by Nahuel
Link to comment
Share on other sites

Try this:

Go to Start-->Run and type: cmd.exe /c ipconfig

See what happens.

Then this: cmd.exe/cipconfig -->'Cannot find external program' :)

Get it? ^_^

-edit-

Were you trying to point out my typo with a stupid joke? :) You still got it, right?

yap, now i know what happen

and thank you very much

you are a good teacher !! and a big kind man

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...