Sign in to follow this  
Followers 0
Luigi

curious about FileCreateShortCut

2 posts in this topic

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


m(o.O)m

Share this post


Link to post
Share on other sites



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:


√-1 2^3 ∑ π, and it was delicious!

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