Jump to content

Frekin Error


 Share

Recommended Posts

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.... :whistle:

Link to comment
Share on other sites

use ShellExecute() instead of Run().

Edited 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

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().

Link to comment
Share on other sites

Will ShellExecute() work on a *.lnk? I couldn't get it to work with...

yes, tested and from help file entry of ShellExecute():

Parameters

filename 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

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

$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. :whistle:

Using the final, 3.2.2.0 on XP SP2.

Link to comment
Share on other sites

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

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. :whistle: 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

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

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

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...