registry key entry for running a program as admin 
Author Message
 registry key entry for running a program as admin

Hello.

I've deployed some PCs under W2000 Pro, and I need to start some scripts on
every machine with the user "administrator".
I've tried to had some entries in the Key
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" because I just have
to start it once.
The problem I have with this solution is that Windows runs this script only
when a session is opened, and with the profile of the user that opened the
session.

To solve my problem, i used a facility of our distribution program, but I'd
still like to know if there is a possibility to do this via the registry.

PS. It's important: I'm not using a domain

Thanks by advance,

Ga?l



Fri, 07 May 2004 18:22:09 GMT  
 registry key entry for running a program as admin
Hi

Here is maybe something that can be used:

SFImpersonator from http://cwashington.netreach.net/

Tools\Com Objects N-Z :

<qoute>
SFImpersonator... Execute Code under the security context of another user.

Another MUST GET. Every NT administrator known to man could have a use for this
thing. No longer do we have to shell out to SU or RUNAS. More than that, it's
extremely easy to use. With this object one can impersonate the security context
of another user. Using the component in your code is as simple as the following.

</qoute>

Alternativly, MS runas.exe utility or WMI may be used. Take a look at this
thread for examples on this:


Subject: Re: Run Apps As Administrator?
Newsgroups: microsoft.public.scripting.wsh
Date: 2001-01-31 12:01:42 PST

You can use http://groups.google.com/advanced_group_search to fetch it :-)

Tip:
To use this utilities, and not wanting to have your admin password in clear text
in script, here are two options:

1) Encode the VBScript with the MS script encoder (Note: there are available
decoders on the Internet that will decode the script, so it is not 100% safe).

2) Use the "compile to exe file" option in AutoIt (not AutoItX) to hide it:
http://www.hiddensoft.com/AutoIt/

--
torgeir

Quote:

> Hello.

> I've deployed some PCs under W2000 Pro, and I need to start some scripts on
> every machine with the user "administrator".
> I've tried to had some entries in the Key
> "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" because I just have
> to start it once.
> The problem I have with this solution is that Windows runs this script only
> when a session is opened, and with the profile of the user that opened the
> session.

> To solve my problem, i used a facility of our distribution program, but I'd
> still like to know if there is a possibility to do this via the registry.

> PS. It's important: I'm not using a domain

> Thanks by advance,

> Ga?l



Sat, 08 May 2004 03:42:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. registry key entry for running a program as admin

2. Changing the (Default) Entry in a Registry Key

3. Key Registry entry

4. find the specify Root key and Sub key from the registry

5. Deleting Registry key and sub-keys?

6. How to enumerate keys in a registry key?

7. Read Registry Keys and Trees / API Call for Registry access

8. Writing to registry through WSH under credentials that don't have admin access

9. VBScript and registry PagingFile Entry....

10. Registry Entry

11. Update of the system after changing registry entries

12. could someone REpost the solution to recursing registry entries

 

 
Powered by phpBB® Forum Software