问题
I'm using the setup wizard project to create an msi installer for a Windows Forms application. I've configured it to install a desktop shortcut, but unfortunately it only puts a shortcut on the desktop of user running the installer. Is there any way to configure it to put shortcuts on the desktops of all users?
回答1:
In the file system editor of your project
- Create a new custom folder (Give it a name like "All Users Start Menu")
- Change the default location to [DesktopFolder] (same applies to [StartMenuFolder]) (See documentation and for Start Menu)
- Set the Property value to ALLUSERS
That should do it, put your shortcuts in the new custom folder. This will allow you to install into the "All Users" folder even though you are installing for "Just Me" for the rest of the installer.
回答2:
Set InstallAllUsers=True in the properties In "Installation Folder" on the "User Interface" page, set InstallAllUsersVisible. If you have an Install and an "Administrative Install" on the "User Interface" page, be sure to modify "Installation Folder" in both.
This will take away the user's choice of installing only for "me" and force the install to be for "everyone".
Now the shortcut you put in the "User's Desktop" of the File System should appear on everyone's desktop.
来源:https://stackoverflow.com/questions/1109492/visual-studio-2005-setup-wizard-creating-desktop-shortcuts-for-all-users