locked
Vista install security question RRS feed

  • Question

  • Hi;

     

    To install a program you need admin rights. A regular user should not have admin rights. So when the installer starts it asks for a username/password that does have admin rights to run. The problem is our installer installs a bunch of files to the user's My Documents and in this case it goes to the admin's My Documents which does the user no good. How can we install to the user's My Documents if the user does not have admin rights?

    We don't need the credentials of the regular user - we just need their My Documents folder. Since Windows must know who is logged in to the system presently this information must exist somewhere. How can we get it?

     

    thanks - dave

     

    ps - I was trying to run non-admin on my own system on Vista but this problem was the straw that broke the camel's back - every installer has this problem.

     

    Friday, April 27, 2007 2:03 PM

All replies

  • The best way to solve this is to use the first-run pattern. Put default copies in the common appdata folder during installation. When the application starts up, check to see if there are copies within the current users profile and, if not, copy the default versions from the common appdata folder.
    Friday, April 27, 2007 2:39 PM
  • There's a couple of problems with that approach:

    1. We're a Word AddIn so we would have to do this when Word starts and Word does not like AddIns that take a while to initialize - it will mark them as bad.
    2. If anyone uses Word - even if they never want to use our AddIn, it would fire this off.
    3. On the final screen of the setup we give them the option to launch Word with one of the samples and feedback is that that helps people get started a lot. So we need it in their My Documents when the setup completes.

    thanks - dave

    Friday, April 27, 2007 3:01 PM