Re: Check-list to installing/running apps as non-admin?



How about this scenario: A setup needs admin priviledges, so it creates a data folder in {CommonAppData} with the default data or templates that a new user requires. When the program is run it checks for the presence of a data folder in User\Documents and if it doesn't find it, creates it and copies any required default or template data from the data folder in {CommonAppData}. This way when a non-admin user runs the setup and they are prompted for an admin username and password for elevation, it's not a problem because no data needs to be installed to the user's specific documents folder.

- Woodie

"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in message news:Oihi5keRIHA.4400@xxxxxxxxxxxxxxxxxxxxxxx
Think about it. If you have admin credentials you are admin. If you click "Run as administrator" and don't have admin credentials you are out of luck. If Vista does not allow normal users to install to Program Files, you must install somewhere else. I don't like it, but have not found any other solution. I have found this is also true when I use InstallShield to create setups. I cannot find any way for a non-admin user to install to Program Files. If you know of way, let me know.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

"Kevin Provance" <casey@xxxxxxxxxxx> wrote in message news:edHzrYdRIHA.5988@xxxxxxxxxxxxxxxxxxxxxxx
What? No, no and no!

Sorry, but installing apps to the root drive is a big no-no, *especially* in
Vista. It will cause way more problems than not. Applications are strongly
encouraged to be installed in Program Files, and all data files written to
the application data folder as they will not write to the apps folder is
program files.

Any user who is not an admin needs to be directed to right-click on your
app's setup program and select "Run as Admin"

You're an MVP, you should know better! <g>


| I've found on Vista that non-admins cannot install to Program Files, so I
| must provide the option to install elsewhere, something like c:\MyApp.
OCX's
| must be registered, but that's not a problem as long as only the one user
| runs the app. Non-admins can only write to HKCU in the registry. If they
| write to HKLM it seems to write, but is actually written to a virtual part
| of the directory that is only valid for them (it does not affect other
| users).
|
| In Vista if a user is logged in as the local administrator and runs a
setup
| (or the program), they must use the "Run as administrator" feature (unless
| UAC is disabled). Otherwise they will not have administrator privileges.
|
| -- | Richard Mueller
| Microsoft MVP Scripting and ADSI
| Hilltop Lab - http://www.rlmueller.net
| -- |
|





.



Relevant Pages

  • Re: auto-updater
    ... All my applications are built with an option to install a network setup ... Originally, the admin does the ... users App Data directory or the common App Data directory. ...
    (borland.public.delphi.non-technical)
  • Re: Windows Server 2008 w/Exchange 2007 Authentication on Active Direc
    ... For the installation part you have to run the setup from exchange with "run as administrator", even if the account you created is in the domain admin group. ... We install DNS on 1 box, then on another box we setup Active ...
    (microsoft.public.windows.server.general)
  • Re: Microsoft has just released a public beta of Microsoft ActiveSync 4.2
    ... Yes, I'm logged in with an admin user (this is my home PC, I'm always logged in as ... Microsoft ActiveSync 4.0 Setup is preparing the InstallShield Wixard, ... Click Finish to exit the wizard. ... Did you run the install under a login which has Admin rights? ...
    (microsoft.public.pocketpc.activesync)
  • Re: How to raise rights...
    ... our setup should be a bit nicer. ... Running setup as admin does ... not help, as it also installs some user-specific data (which would be admin, ... install at home run after setup as Admin, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to raise rights...
    ... I think it's better NOT user specific (for any user, setup must be run...), ... which does need what rights. ... Someone must look through the install code to ... if I'm impersonating an admin, which user is active when I ...
    (microsoft.public.win32.programmer.kernel)