Guest school110 Posted September 11, 2004 Share Posted September 11, 2004 (edited) i used the code,Run(@COMSPEC & ' /c "c:\path-to-link\My Shortcut.lnk"',"", @@SW_SHOW), to RUN a file like * lnk, but it did not available in this case: i add a network place called "我的宽带" it's a linker pointed to local area connection. Then , i put its path into the code above, but it can't open and run the file "我的宽带!!!! HELP!!!!!! Edited September 11, 2004 by school110 Link to comment Share on other sites More sharing options...
SlimShady Posted September 11, 2004 Share Posted September 11, 2004 This will only work Run(@COMSPEC & ' /c "c:\path-to-link\My Shortcut.lnk"') If this file exists c:\path-to-link\My Shortcut.lnk Here's an example that I tested and works. Run(@ComSpec & ' /c "' & @DesktopDir & '\Media Player Classic.lnk"', '', @SW_HIDE) Change "Media Player Classic" to the name of your shortcut. Link to comment Share on other sites More sharing options...
ezzetabi Posted September 11, 2004 Share Posted September 11, 2004 Otherwise if everything fail you can try: (only W2000/Xp)$cmd =;your .lnk file path here... Run(@SystemDir & '\RUNDLL32.EXE shell32.dll,ShellExec_RunDLL "' & $sCmd & "'")Thanks PacMan 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