Re: Is It possible to run a script as admin?
From: Joe Earnest (joeearnestNO_at_SPAMqwest.netPLEASE)
Date: 04/14/04
- Next message: Greg: "How can I migrate Outlook inbox rules via a script?"
- Previous message: news.microsoft.com: "Re: Is It possible to run a script as admin?"
- In reply to: news.microsoft.com: "Re: Is It possible to run a script as admin?"
- Next in thread: cseeger: "Re: Is It possible to run a script as admin?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Apr 2004 11:12:33 -0600
Hi,
"news.microsoft.com" <Richard@RaptorCon.net> wrote in message
news:#FV3oJkIEHA.3720@tk2msftngp13.phx.gbl...
> If the device is Win2K or WinXP, you can use RunAs, however Runas will
only
> work with an exe and you'll also have to specify a password (unencrypted).
>
> The best way to do this is to use a program (Wise Installer is what I use)
> to compile your code in an exe.
> You'll still have the problem of passing the password, the way I have done
> this in the past is to;
> Create an exe with your compiled code.
> Create another exe that calls RunAs+.exe (a microsoft scriptable runas
> available on the net).
> Then you call runas+ to run the 1st exe in admin context passing
it
> the necessary parameters (& password).
>
> SMS Installer could be used but be aware that it can be decompiled by
> another SMSInstaller user and read the password.
> I would also suggest:
> * Putting the password in split up string variables for more security
> * Try to place all the code necessay and date encode it so that if
someone
> was to get ahold of the exe (1st one complied in the 2nd one) then there
> would not be any danger of them passing other arguments to run other code
in
> admin context.
>
>
> If you were using WMI to connect to a remote box, then you could connect
as
> alterante credentials, however this is not possible when called from the
PC
> itself.
>
> Richard
>
>
> "cseeger" <cseeger@nospam.nospam> wrote in message
> news:Xns94CB76449FCAEcseegerinteractivede@207.46.248.16...
> > cseeger <cseeger@nospam.nospam> wrote in
> > news:Xns94CB756302C5Bcseegerinteractivede@207.46.248.16:
> >
> > > Is it possible for me to run a script with administrator rights? From
a
> > > regular domain user account???
> > >
> > > thanks!!
> > >
> > > -cseeger
> > >
> >
> > Sorry, I should elaborate. I wrote a script that requires the user have
> > admin access. I dont want to grant that. Infact, the script is a logon
> > script. If I could just allow admin access for the logon script I'd be
> > set.
> >
> > So, is there a way to elevate the account status to admin, just to run
> > the script. Then switch the account status back to normal user????
> >
> > thanks!
> >
> > -cseeger
>
Just a quick note. The new version 3 of AutoIt (the script, not the AutoItX
COM add-on) now has sufficent methods to write most logon scripts. AutoIt
script also compiles to an EXE.
Hiddensoft freeware
www.hiddensoft.com/autoit/
Joe Earnest
- Next message: Greg: "How can I migrate Outlook inbox rules via a script?"
- Previous message: news.microsoft.com: "Re: Is It possible to run a script as admin?"
- In reply to: news.microsoft.com: "Re: Is It possible to run a script as admin?"
- Next in thread: cseeger: "Re: Is It possible to run a script as admin?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|