Sign in to follow this  
Followers 0
henrychien

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

5 posts in this topic

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

Share this post


Link to post
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 )

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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

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