Jump to content
Sign in to follow this  
Luigi

curious about FileCreateShortCut

Recommended Posts

Hi forum

If you try create a shortcut, like this:

Local $try = FileCreateShortcut( _
        "C:\Windows\System32\calc.exe", _
        "C:\calc.lnk", _
        "C:\Windows\System32", _
        "", _
        "calc", _
        "C:\Windows\System32\calc.exe", _
        "", _
        "0", _
        7 _
        )

At least for me...
When you open the shortcut and try change the icon, it say:
Windows cannot open the file...

The solution is use for line

Local $try = FileCreateShortcut( _
        "C:\Windows\System32\calc.exe", _
        "C:\calc.lnk", _
        "C:\Windows\System32", _
        "", _
        "calc", _
        FileGetShortName("C:\Windows\System32\calc.exe"), _
        "", _
        "0", _
        7 _
        )

or double slashes

Local $try = FileCreateShortcut( _
        "C:\Windows\System32\calc.exe", _
        "C:\calc.lnk", _
        "C:\Windows\System32", _
        "", _
        "calc", _
        "C:\\Windows\\System32\\calc.exe", _
        "", _
        "0", _
        7 _
        )

Now try edit the icon's shortcut.

I know... this is a only shortcut, whitout greate value...
 

This is append only whit me?

Br, Detefon

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  

×
×
  • Create New...