How do we create an installer than doesn't require administrator permissions?

后端 未结 4 669
感情败类
感情败类 2021-01-12 22:04

When creating a setup/MSI with Visual Studio is it possible to make a setup for a simple application that doesn\'t require administrator permissions to install? If its not

相关标签:
4条回答
  • 2021-01-12 22:45

    ClickOnce is a good solution to this problem. If you go to Project Properties > Publish, you can setup settings for this. In particular, "Install Mode and Settings" is good to look at:

    • The application is available online only -- this is effectively a "run once" application
    • The application is avaiable offline as well (launchable from Start Menu) -- this installs the app on the PC

    You don't actually have to use the ClickOnce web deployment stuff. If you do a Build > Publish, and then zip up the contents of the publish\ folder, you can effectively distribute that as an installer. To make it even smoother, create a self-extracting archive from the folder that automatically runs the setup.exe file.

    Even if you install this way, if you opt to use it, the online update will still work for the application. All you have to do is put the ClickOnce files online, and put the URL in the project's Publish properties page.

    0 讨论(0)
  • 2021-01-12 22:48

    IF UAC is enabled, you couldn't write to Program Files. Installing to \AppData will indeed only install the program for one user.

    However, you must note that any configuration changes that require changes to the registry probably(I'd have to double check on that) administrator privilege. Off the top of my head modifications to the desktop background are ultimately stored in HKEY_CURRENT_USER.

    0 讨论(0)
  • 2021-01-12 22:50

    Vista is more restrictive about this kind of thing, so if you can't do it for XP you can bet Vista won't let you either.

    You are right that installing to the program files folder using windows installer requires administrative permissions. In fact, all write access to that folder requires admin permsissions, which is why you should no longer store your data in the same folder as your executable.

    Fortunately, if you're using .Net you can use ClickOnce deployment instead of an msi, which should allow you to install to a folder in each user's profile without requiring admin permissions.

    0 讨论(0)
  • 2021-01-12 22:54

    The only way that I know of to do this is to build a ClickOnce application in .NET 2.0+

    If the user of your application has the correct pre-requsits installed then the application can just be "launched".

    Check out:

    • Microsoft Family.Show
    0 讨论(0)
提交回复
热议问题