I\'m using Visual Studio 2008 and have created a setup project for my application. The application has a high-resolution icon (for Vista). There\'s a bug in Visual Studio, a
I just had to do this too - here is my VBScript file (in case it's useful to anyone)...
Dim msiInstaller
Dim msiDatabase
Dim msiView
Dim msiRecord
Dim pathToMsiFile
Dim pathToIconFile
If WScript.Arguments.Count <> 2 Then
WScript.Echo "Usage:" & vbCrLf & " " & WScript.ScriptName & " "
WScript.Quit
End If
Dim pathToMsi, pathToIcon
pathToMsi = WScript.Arguments(0)
pathToIcon = WScript.Arguments(1)
Set msiInstaller = CreateObject("WindowsInstaller.Installer")
Set msiRecord = msiInstaller.CreateRecord(1)
msiRecord.SetStream 1, pathToIcon
Set msiDatabase = msiInstaller.OpenDatabase(pathToMsi, 1)
Set msiView = msiDatabase.OpenView("UPDATE Icon SET Data = ? WHERE Name <> ''")
msiView.Execute msiRecord
msiDatabase.Commit
This script replaces all shortcut icons in the MSI database with a single icon - if you need to be selective then you have some more work to do.