Re: DllRegisterServer and NT security



A user must be a member of Administrators in order to have write/delete
access to HKEY_LOCAL_MACHINE. Members of Power Users have limited
write/delete access. It's limited mainly to "HKEY_LOCAL_MACHINE\Software".
Power Users don't have write access to
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\FileRenameOperations", in which the API function MoveFileEx() writes
a file name to be replaced during reboot. For this reason installations fail
if a file has to be replaced, otherwise Power Users can install software.

Here are the registry entries that are created by ActiveX objects:

INFO: Registry Entries Made by an ActiveX Component
http://support.microsoft.com/default.aspx?scid=kb;en-us;183771

Also read this section that explains the difference between Administrators
and Power Users regarding installations. I tried to simplify it above.

http://www.jrsoftware.org/isfaq.php#ntsecur

As for other approaches to solve this, read about these API functions:

CreateProcessWithLogonW, requires Windows 2000+, easy to use.
CreateProcessAsUser, requires Windows NT3.51+

Note that these functions maybe referring to HKEY_CURRENT_USER as the user's
profile. So if it's not loaded for the admin, you are going to have
problems.

It's possible, without programming, to edit shortcuts to run as a different
user. Under XP, I just go to the shortcut tab, click Advanced, and then
select "Run with different credentials". When I open the shortcut, it
prompts me with a username and a password. Windows 2000 has a similar
option. I am not sure about NT4. Also, administrators can use the RUNAS
command line to do the same thing, from a logon script for example, but I am
not sure how the password is handled.

You may want to search google groups for "vb -dotnet <function name>" first,
to see what code or what other things that you or I may have overlooked.


"Andy DF" <nospam@xxxxxxxxxx> wrote in message
news:43292706$0$8484$5fc30a8@xxxxxxxxxxxxxxxxxx
>I have an autoupdate app that I use to deploy updates of my apps to end
> users.
> The application is DllRegisterServer capable in case I need to
> deploy/update
> an ActiveX dll/ocx.
>
> Code found here has been used for dynamic registering/unregistering of COM
> objects:
> http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=46775&lngWId=1
>
> Just recently I've run into the security issue with Win NT and above.
> If the user updating the application doesn't have administrative rights,
> DllRegisterServer will fail, and the whole updating process will end up in
> a
> mess.
>
> Is there a way, thru VB code, to momentarely gain administrative rights to
> perform registration of COM objects?
>
> TIA,
> Andy
>
>
>


.



Relevant Pages

  • Re: Help with User Groups (XP Pro)
    ... the Administrators, Power Users, Users groups. ... likely see the account you changed in the groups you expect. ... Then Removed the Administrators. ... > Welcome sign on it shows that the User is a member of an unknown group. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Allowing a Domain User Admin Rights to a Couple of Domain Servers
    ... There are only few differences between a Power Users member ... and an Administrators group member, ...
    (microsoft.public.windows.server.security)
  • Re: Event ID: 1202
    ... Cannot find Power Users. ... SeEnableDelegationPrivilege = Administrators ... SeSystemEnvironmentPrivilege = Administrators ... SeRestorePrivilege = Backup ...
    (microsoft.public.win2000.active_directory)
  • Re: Adding a location from a domain
    ... or power users, but I can only add users from the local station. ... Double clicking on the group administrators. ... The batch file would have this: ... net localgroup power users DOMAIN\localpoweruser /add ...
    (microsoft.public.windowsxp.network_web)
  • Re: Disabling sharing tab in client systems
    ... removing them from the power users or administrators group and making sure ... that they are only regular users. ... member of a domain group that is a member of the local administrators or ... power users group on his computer. ...
    (microsoft.public.windows.server.security)