Jump to content

Recommended Posts

Posted

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

Visit my repository

  • Moderators
Posted

Your first script works just fine for me on WIN7x64. I did, of course, have to add in #RequireAdmin, as you're trying to save the shortcut to the root of C:

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
×
×
  • Create New...