Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Running a logon script with Administrator privileges?

HTVi
TV Discussion Newsgroups

Running a logon script with Administrator privileges?
erronen[ at ]gmail.com 5/3/2007 2:22:57 PM
Recently, I've had to add a script that runs at logon for all our
users that removes a file from a protected folder and replaces it with
a new one copies from our fileserver. Our server is Win2k3 with AD and
all our users are running XP SP2.

Basically, the script opens a folder that the user's account doesn't
have access to, deletes the file in it and copies the new file from
the fileserver into the folder. However, since the user's account
doesn't have admin privileges, the script fails when it tries to open
the folder. It works fine on the computers that belong to users that
have admin privileges.

The script itself is two lines, a del command followed by an xcopy.
You don't get much simpler than this.

Is there a way to run the script automatically as Administrator so I
don't have to walk around to each computer and log in once to make
sure the script runs?

If I've left out any important info, let me know.

Thanks!

Re: Running a logon script with Administrator privileges?
"Richard Mueller [MVP]" <rlmueller-nospam[ at ]ameritech.nospam.net> 5/3/2007 4:30:19 PM

<erronen[ at ]gmail.com> wrote in message
news:1178202176.993600.248440[ at ]h2g2000hsg.googlegroups.com...
[Quoted Text]
> Recently, I've had to add a script that runs at logon for all our
> users that removes a file from a protected folder and replaces it with
> a new one copies from our fileserver. Our server is Win2k3 with AD and
> all our users are running XP SP2.
>
> Basically, the script opens a folder that the user's account doesn't
> have access to, deletes the file in it and copies the new file from
> the fileserver into the folder. However, since the user's account
> doesn't have admin privileges, the script fails when it tries to open
> the folder. It works fine on the computers that belong to users that
> have admin privileges.
>
> The script itself is two lines, a del command followed by an xcopy.
> You don't get much simpler than this.
>
> Is there a way to run the script automatically as Administrator so I
> don't have to walk around to each computer and log in once to make
> sure the script runs?
>
> If I've left out any important info, let me know.

One option is to run this as a Startup script. Startup scripts run with
System privileges on the local computer and the privileges of the computer
object in the domain. The computer object will need read access to the
source of the file, but you can grant this permission to the group "Domain
Computers".

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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen