Re: Running a logon script under another account by Peter
Peter
Fri Oct 07 13:45:50 CDT 2005
Thanks, I'll give it a try and let you know how it works out.
I guess this solution depends on the focus being in the password textbox.
"JHP" <goawayspam@GFY.com> wrote in message
news:O$Pp%2332yFHA.2792@tk2msftngp13.phx.gbl...
> Not sure if this will work for you, but it's worth a try:
>
> Option Explicit
>
> Dim objShell
> Const WindowStyle = 2
> Const WaitOnReturn = False
>
> Set objShell = Wscript.CreateObject("WScript.Shell")
> objShell.Run "RunAs /user:ACCOUNT@DOMAIN " &_
> "C:\DIRECTORY\VSSetup.exe""", WindowStyle, WaitOnReturn
> WScript.Sleep 100
> objShell.Sendkeys "PASSWORD~"
> Set objShell = Nothing
>
> "Peter Avalos" <petera@proexam.org> wrote in message
> news:e6hWTT1yFHA.1856@TK2MSFTNGP12.phx.gbl...
>> Does anyone know how to run a .vbs logon script under a different account
>> than the account that's logging in? The reason I need to do this is that
>> the script installs a software package if it's not already installed on
>> the machine that the user is logging onto. The Active Directory Group
>> Policy restricts software installation to domain administrators, so I
>> wanted to run this script with elevated priviledges to get around this
>> restriction imposed by the Group Policy. Has anyone effectively dealt
>> with a similar issue?
>>
>> Some background info:
>> --All client machines are Windows XP Pro
>> --Main AD Server (Global Catalog) is 2003. Other domain controllers are
>> 2003 and 2000
>>
>>
>
>