Possible Variable problem with Create Shortcut and MODIFY
Posted: Sun Jul 08, 2018 11:06 pm
It was reported to us that on MODIFYing an existing installation, icons for removed components remained on the Desktop and Start Menu. When looking at the log, the reason was obvious, a Variable had not been expanded prior to being used.
MODIFY log:
Looking at the install and uninstall logs, no problem appears to exist.
INSTALL log:
UNINSTALL log:
To workaround this I have added an IF statement around multiple Create Shortcut commands, removing the need for a variable. This is satisfactory for us, but I thought I'd let you know and maybe help others who may run in to this problem.
MODIFY log:
Code: Select all
MSI: Executing op: SetTargetFolder(Folder=25)
MSI: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop
MSI: Executing op: ShortcutRemove(Name=$BRAND~1|$BRAND$ App Configuration)
MSI: Executing op: SetTargetFolder(Folder=23\Objectif Lune\PReS Workflow\)
MSI: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI: Executing op: ShortcutRemove(Name=$BRAND~1|$BRAND$ App Configuration)
Looking at the install and uninstall logs, no problem appears to exist.
INSTALL log:
Code: Select all
MSI: Executing op: SetTargetFolder(Folder=25)
MSI: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop
MSI: Executing op: ShortcutCreate(Name=TheBra~1|TheBrand App Configuration,,,...)
MSI: Verifying accessibility of file: TheBrand App Configuration.lnk
MSI: Executing op: SetTargetFolder(Folder=23\InstallLocation\)
MSI: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI: Executing op: ShortcutCreate(Name=TheBra~1|TheBrand App Configuration,,,...)
MSI: Verifying accessibility of file: TheBrand App Configuration.lnk
UNINSTALL log:
Code: Select all
MSI: Executing op: SetTargetFolder(Folder=25)
MSI: SHELL32::SHGetFolderPath returned: C:\Users\Public\Desktop
MSI: Executing op: ShortcutRemove(Name=TheBra~1|TheBrand App Configuration)
MSI: Verifying accessibility of file: TheBrand App Configuration.lnk
MSI: Using source file security for destination.
MSI: Executing op: SetTargetFolder(Folder=23\InstallLocation\)
MSI: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI: Executing op: ShortcutRemove(Name=TheBra~1|TheBrand App Configuration)
MSI: Verifying accessibility of file: TheBrand App Configuration.lnk
MSI: Using source file security for destination.
To workaround this I have added an IF statement around multiple Create Shortcut commands, removing the need for a variable. This is satisfactory for us, but I thought I'd let you know and maybe help others who may run in to this problem.