Install for all users and data access

前端 未结 2 1336
心在旅途
心在旅途 2021-01-17 02:43

What\'s the best way to modify my installer application to install my exe and several data files into a location that all users can access? I want any XP/Vista/Win7 user to

2条回答
  •  有刺的猬
    2021-01-17 03:09

    First you need to change your installation type to per-machine:

    • select your setup project in Solution Explorer
    • in its Properties pane set InstallAllUsers to True

    After that, you can configure the default installation folder:

    • go to your setup project File System Editor
    • select Application Folder
    • in its Properties pane set DefaultLocation to:

      [CommonAppDataFolder][Manufacturer]\[ProductName]

    • add your files in Application Folder

    You can read more about CommonAppDataFolder here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa367992(v=vs.85).aspx

    Finally, in the File System Editor you can add your shortcuts in User's Desktop folder. It uses DesktopFolder property which is automatically resolved to the All Users desktop for a per-machine installation.

提交回复
热议问题