Add Icon to shortcut?
Hello!
Trying to add an icon to a shortcut that i have created and it is harder then i thought i would be! :)
As i understand i need to put the .EXE file with the icon that i want to use in the Binary Table, then create a record in the Icon Table and specify that Icon in the Icon field of the Shortcut table? Right?
The problem is that i have no idea how to populate the Binary Table with any information. I am Using Inst ED.
Can anyone give help me or give me some direction on how to accomplish this.
Thanks!
// Bartoooo
Trying to add an icon to a shortcut that i have created and it is harder then i thought i would be! :)
As i understand i need to put the .EXE file with the icon that i want to use in the Binary Table, then create a record in the Icon Table and specify that Icon in the Icon field of the Shortcut table? Right?
The problem is that i have no idea how to populate the Binary Table with any information. I am Using Inst ED.
Can anyone give help me or give me some direction on how to accomplish this.
Thanks!
// Bartoooo
0 Comments
[ + ] Show comments
Answers (4)
Answer Summary:
Please log in to answer
Posted by:
Bartoooo
12 years ago
Posted by:
RandomITPro
12 years ago
The following vbs script will create a shortcut in the allusers folder, and assign it an icon
set objShell = Wscript.Createobject("Wscript.Shell")
strDesktopFld = objShell.SpecialFolders("AllUsersDesktop")
Set objURLShortcut = objShell.createShortcut(strDesktopFld&"\YourShortcut.lnk")
'Name for Shortcut to add
objURLShortcut.Targetpath = "http://www.itninja.com/question/add-icon-to-shortcut"
'Path to icon
objURLShortcut.IconLocation = "C:\PATHTO\YourIcon.ico"
'Path for Shortcut
objURLShortcut.Save
set objShell = Wscript.Createobject("Wscript.Shell")
strDesktopFld = objShell.SpecialFolders("AllUsersDesktop")
Set objURLShortcut = objShell.createShortcut(strDesktopFld&"\YourShortcut.lnk")
'Name for Shortcut to add
objURLShortcut.Targetpath = "http://www.itninja.com/question/add-icon-to-shortcut"
'Path to icon
objURLShortcut.IconLocation = "C:\PATHTO\YourIcon.ico"
'Path for Shortcut
objURLShortcut.Save
Posted by:
saranyadurairasu
12 years ago
Posted by:
lukus22
9 years ago
I'd like to expand on this - Using Insted:
- Open the MSI
- Click "Show Empty Tables" checkbox
- Open the "Icon" Table.
- Right click, then add row.
- First value will be whatever the icon will be referred to within the MSI.
- Second value, browse to the exe with the icon you want, and click the <-- button to load the file.
- Click OK
- Open the shortcut table
- Identify the shortcut you are working on, and enter the name of the icon you entered into the icon table.
You can now save the MSI, and the shortcut should now have the icon you specified.