Click to See Complete Forum and Search --> : Installer needs to be run as admin, but it installs things in the Admin accounts dir
Laura Jennings
Nov 23rd, 2008, 10:16 AM
Hello, I have a setup program for one of my applications and when I run it on Vista, it asks for the administrator's password. The problem is, it needs to install certain things to the application data folder. When it does so, the files are installed to the Administrator's application data folder as opposed to the user account that actually launched the program. Can anyone think of a workaround for this? Thank you so much.
joaquim
Nov 23rd, 2008, 11:21 AM
Hello, I have a setup program for one of my applications and when I run it on Vista, it asks for the administrator's password. The problem is, it needs to install certain things to the application data folder. When it does so, the files are installed to the Administrator's application data folder as opposed to the user account that actually launched the program. Can anyone think of a workaround for this? Thank you so much.
what i can see is that you enter in a count that isn't administrator. and you have some restrited areas... for you install the program, you mus enter in administrator count or same areas must not be restrited...
i'm sorry, if i don't give you good news
Laura Jennings
Nov 23rd, 2008, 11:28 AM
Hello, thank you for your reply. I am totally fine that the user has to enter in the administrator password. That is not the issue. My problem is, once they enter that password, the installation files are copied to the administrator's user directory as opposed to the launching user. In this scenario, the user does not have proper access to the installed files as they are not in their directory. Any advice?
joaquim
Nov 23rd, 2008, 12:00 PM
Hello, thank you for your reply. I am totally fine that the user has to enter in the administrator password. That is not the issue. My problem is, once they enter that password, the installation files are copied to the administrator's user directory as opposed to the launching user. In this scenario, the user does not have proper access to the installed files as they are not in their directory. Any advice?
what program you use for build your setup programs?
dilettante
Nov 23rd, 2008, 12:48 PM
This is referred to as Over The Shoulder installation, since in the general scenario a standard user must have an administrator drop by to enter his/her credentials into the elevation request dialog.
One of the simpler ways around the problem you are encountering is to have the installation process put any such per-user files into a read-only common location (could be Program Files, CommonAppData, etc.). Then as a post-installation step, your application should perform a first-run action to copy these files from the common location into the desired per-user locations.
There are many ways to detect whether a program is running as "first run" or not. Often it can be as easy as looking for the absence of one of these per-user files in its intended location. A per-user INI file might be a good candidate but if you don't use an INI file it could be almost any file expected to "live" as long as the program is installed. In an extreme case you might use a value in a key under HKCU to note when the first run has completed.
This can have implications when the program is uninstalled later. Uninstall might leave orphaned copies of per-user data on the computer for (potentially) hundreds of users.
This has been discussed a lot over the years and remains as an issue today. See Why Uninstallers Don't Clean Up User Files (http://blogs.adobe.com/simplicity/2008/07/why_uninstallers_dont_clean_up_user_files.html) for a very brief discussion.
si_the_geek
Nov 23rd, 2008, 01:34 PM
Thread moved to Application Deployment forum, which is where questions about installing/distributing your software belong
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.