Sign in to follow this  
Followers 0
Eambo

ShellExecute not working?

3 posts in this topic

Hi there!

For some reason, my ShellExecute doesn't seem to want to work. I have the following code:

ShellExecute("D:\Documents and Settings\All Users\Documents\Shortcut to Wireless Network Connection.lnk")

Is there something wrong in the above? When I run it nothing happens, however if I go to start --> run and put in the above it works as intended...

Thanks in advance for any help/suggestions =-)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this :

$_LinkPath = "D:\Documents and Settings\All Users\Documents\Shortcut to Wireless Network Connection.lnk"
$_ShortcutTargetPath = FileGetShortcut ( $_LinkPath )
If Not @error Then ShellExecute ( $_ShortcutTargetPath[0] )

Or this

$_LinkPath = "D:\Documents and Settings\All Users\Documents\Shortcut to Wireless Network Connection.lnk"
ShellExecute ( "Explorer.exe", $_LinkPath )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

:/

it don`t work on my comp 2 with ShellExecute and i cant find alternative, start run is running, from run() its not running or im doing something wrong

don`t know if there is ObjCreate alternative, as far as i seen there is not, exception is to put hotkey on shortcut.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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