TheGh0st 0 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.... Share this post Link to post Share on other sites
/dev/null 1 Posted February 8, 2007 (edited) use ShellExecute() instead of Run(). Edited February 8, 2007 by /dev/null Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
xcal 2 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(). Hide xcal's signature Hide all signatures How To Ask Questions The Smart Way Share this post Link to post Share on other sites
/dev/null 1 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). Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
xcal 2 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 Hide xcal's signature Hide all signatures How To Ask Questions The Smart Way Share this post Link to post Share on other sites
/dev/null 1 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) Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
xcal 2 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. Hide xcal's signature Hide all signatures How To Ask Questions The Smart Way Share this post Link to post Share on other sites
/dev/null 1 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... Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
xcal 2 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. Hide xcal's signature Hide all signatures How To Ask Questions The Smart Way Share this post Link to post Share on other sites
/dev/null 1 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. Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
TheGh0st 0 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 ... Share this post Link to post Share on other sites
/dev/null 1 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") Hide /dev/null's signature Hide all signatures __________________________________________________________(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 * Share this post Link to post Share on other sites
xcal 2 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 Hide xcal's signature Hide all signatures How To Ask Questions The Smart Way Share this post Link to post Share on other sites