TheGh0st Posted February 8, 2007 Share Posted February 8, 2007 Hi I'm trying to access the Network connections page Via a shortcut ... C:\Documents and Settings\ssellars\Desktop\test.au3 (1) : ==> Unable to execute the external program.: run("C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\Communications\Network Connections.lnk") I must be doing something wrong ??? any help would be great.... Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 (edited) use ShellExecute() instead of Run(). Edited February 8, 2007 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
xcal Posted February 8, 2007 Share Posted February 8, 2007 Will ShellExecute() work on a *.lnk? I couldn't get it to work with... ShellExecute(@StartMenuDir & '\programs\accessories\notepad.lnk') oÝ÷ Ù»¶¬Âäy×â殶s`¢b33c¶fÆRÒfÆTvWE6÷'F7WB7F'DÖVçTF"fײb33²b3#·&öw&×2b3#¶66W76÷&W2b3#¶æ÷FWBæÆæ²b33²¥'Vâb33c¶fÆU³Ò @OP: You'll also want to look up "CLSIDs of Special Folders" in the help file to use with ShellExecute(). How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 Will ShellExecute() work on a *.lnk? I couldn't get it to work with...yes, tested and from help file entry of ShellExecute():Parametersfilename The name of the file to run (EXE, .txt, .lnk, etc). __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
xcal Posted February 8, 2007 Share Posted February 8, 2007 (edited) Well ya, I know what the help file says. I tried ShellExecute with other .lnk files and they won't work for me. I wonder what I'm doing wrong? edit - Also, ShellExecute is returning 1 (success), but it just doesn't start the shortcut's target for me. Edited February 8, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 edit - Also, ShellExecute is returning 1 (success), but it just doesn't start the shortcut's target for me. I don't know. It works for me. What's your AU3 version? $source = @WindowsDir & "\notepad.exe" $shortcut = @DesktopDir & "\Shortcut Test.lnk" FileCreateShortcut($source,$shortcut) ShellExecute($shortcut) __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
xcal Posted February 8, 2007 Share Posted February 8, 2007 $source = @WindowsDir & "\notepad.exe" $shortcut = @DesktopDir & "\Shortcut Test.lnk" FileCreateShortcut($source,$shortcut) ShellExecute($shortcut) Very strange. That doesn't work for me. It creates the shortcut on my desktop, but ShellExecute doesn't make it go. Both functions are returning 1. But, just double clicking the new shortcut works. Using the final, 3.2.2.0 on XP SP2. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 Using the final, 3.2.2.0 on XP SP2.same here AND notepad pops up. So, I don't know what's wrong with your system... __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
xcal Posted February 8, 2007 Share Posted February 8, 2007 Just tested it in a system I have setup in a virtual machine and it works... so there's something funky going on with my host OS. Guess I'll have to do some comparisons. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 Just tested it in a system I have setup in a virtual machine and it works... so there's something funky going on with my host OS. Guess I'll have to do some comparisons.do you have any spyware protection/firewall tools running? If so, temporarily disable them and then run the script again. __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
TheGh0st Posted February 8, 2007 Author Share Posted February 8, 2007 Thanks everyone for the quick responses .. I just ended up using the direct link run("explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007acc7-3202-11d1-aad2-00805fc1270e}") that works ... Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 Thanks everyone for the quick responses .. I just ended up using the direct link run("explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007acc7-3202-11d1-aad2-00805fc1270e}") that works ... well, that's something completely different.... Best way to do what you want: Run("rundll32.exe shell32.dll,Control_RunDLL ncpa.cpl") __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
xcal Posted February 8, 2007 Share Posted February 8, 2007 (edited) do you have any spyware protection/firewall tools running? If so, temporarily disable them and then run the script again.Only AVG running.edit - Sorry, guess I should mention that I did disable it, and it didn't help. Edited February 8, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now