Jump to content

Recommended Posts

Posted

Hey YGYL,

It's not easy to understand what you say :)

Maybe you can ask a friend to translate it to english for you? Or in last resort, post your question in your original language!

Posted (edited)

FileCreateShortcut ( "file", "lnk" [, "workdir" [, "args" [, "desc" [, "icon" [, "hotkey" [, icon number [, state]]]]]]] )

"icon" Parameter can not working correctly  Under WIN2012 & WIN8

my computer name is SERVER,when "icon" Parameter is "servershell32.dll"

"servershell32.dll" Will be automatically replace to  %COMPUTERNAME%shell32.dll

on LAN ,Using another WIN8 computer to look (rightClick) this Create lnk file, the "icon" will be error

Edited by YGYL
Posted

Does it work if you create a shortcut via the manual method and changing the icon too? If the answer is no, then it's not a bug.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Maybe this was the bug trancexx mentioned a while back in my PasteBin thread.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • 6 years later...
Posted
  On 2/6/2014 at 5:10 PM, guinness said:

This may be off topic and involve a different FileCreateShortcut bug, but when I use the AutoIt command FileCreateShortcut to create a shortcut that has an icon whose path points to a root folder, the icon will not show. In other words, 

@HomePath & "\IconPath\my.ico"
or 
"C:\IconPath\my.ico"

will resolve as "%SystemDrive%\IconPath\my.ico". And the icon will not display until I open the shortcut 's properties and click on "change icon" button, then the icon will appear. But why should I have to do that?

Expand  

 

Posted (edited)

This command will work fine...

FileCreateShortcut ("D:\UTILITY\Print\help.chm", @StartMenuCommonDir & "\Programs\Print\Help.lnk", "D:\UTILITY\Print", "", "Printer Help Guide", @WindowsDir & "\system32\wscui.cpl", "" , 1, @SW_SHOWNORMAL)

 

But these commands will produce a shortcut with no icon displayed and having an icon path in the  shortcut properties that says "%SystemDrive%\Bin\Icons"

FileCreateShortcut ("D:\MEDIA\TV\Software\Family.au3", @StartMenuCommonDir & "\Programs\,TV\Family Room Remote.lnk", "", "", "Script to Configure Some Software", "C:\Bin\Icons\My.ico", "" , 1, @SW_SHOWNORMAL)

FileCreateShortcut ("D:\MEDIA\TV\Software\Family.au3", @StartMenuCommonDir & "\Programs\,TV\Family Room Remote.lnk", "", "", "Script to Configure Some Software", @HomePath & "\Bin\Icons\My.ico", "" , 1, @SW_SHOWNORMAL)

The only way I have found to fix this is to replace @homePath with a variable declaring the path at the top of your script.

Edited by copyleft

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...