Custom action to remove old shortcuts
This is prolly a complete newb question, but we're migrating from winstall to MSI's for our packages, and the problem we're having is as we make the switch, the winstall packages (as per our old SOP) had the version number in the shortcut name. With our move to MSI's we dont' want this.
So we have written a VBScript that will accomplish the task for us, and we want to embed it into the MSI so that when the user goes to run the program for the first time it executes the script. The problem lies in that this MSI is an upgrade so it sees that the needed files in the users app data folder exists and as such doesn't repair the installation. We're at a loss of how to get this to work. Our goal is to make this transition completely transparent to our users.
Thanks for any and all help.
So we have written a VBScript that will accomplish the task for us, and we want to embed it into the MSI so that when the user goes to run the program for the first time it executes the script. The problem lies in that this MSI is an upgrade so it sees that the needed files in the users app data folder exists and as such doesn't repair the installation. We're at a loss of how to get this to work. Our goal is to make this transition completely transparent to our users.
Thanks for any and all help.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
WiseUser
19 years ago
I guess it depends if the existing shortcuts are "per-machine" (under "All Users") or "per-user"?
"Per machine" shortcuts can be removed during installation (custom action or RemoveFiles) rather than at application run time. Even if the user did have permissions to remove these shortcuts, how would he know which shortcut to use? He'd probably call the helpdesk to find out.
For "per-user" shortcuts, I'd copy your vbscript to the application folder during installation and use a "per-machine" registry run key or "All Users\Startup" shortcut to launch it at log on.
If you do choose the script option, your may as well make the script deal with the "Application Data" stuff. Just install these files to a sub-directory of your application folder during installation (instead of directly to the profile), then copy them to the user profile at first log on using your script. Make sure you create an HKCU registry key so that you know that the script has already been executed for that user - otherwise, you might be copying files to his profile EVERY time he logs on!
"Per machine" shortcuts can be removed during installation (custom action or RemoveFiles) rather than at application run time. Even if the user did have permissions to remove these shortcuts, how would he know which shortcut to use? He'd probably call the helpdesk to find out.
For "per-user" shortcuts, I'd copy your vbscript to the application folder during installation and use a "per-machine" registry run key or "All Users\Startup" shortcut to launch it at log on.
If you do choose the script option, your may as well make the script deal with the "Application Data" stuff. Just install these files to a sub-directory of your application folder during installation (instead of directly to the profile), then copy them to the user profile at first log on using your script. Make sure you create an HKCU registry key so that you know that the script has already been executed for that user - otherwise, you might be copying files to his profile EVERY time he logs on!
Posted by:
CedricMordrin
19 years ago
Thanks for the info.
We currently use "per user" shortcuts, and we want to go to "per machine" ones, that way if the software isn't available in the lab the shortcut won't appear and the students won't try to use it.
We use roaming profiles and about 80% of our users don't use the same computer all the time (University).
We currently use "per user" shortcuts, and we want to go to "per machine" ones, that way if the software isn't available in the lab the shortcut won't appear and the students won't try to use it.
We use roaming profiles and about 80% of our users don't use the same computer all the time (University).
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.