General information
Title:
'IMPERSONATE' in a Login Script
Is there a script already written that will allow for activities to be processed under an Admin account?
I want to remove some icons added by SP3 for W2K from the ALL USERS profile and I thought the best way to handle that is via a logon script. About 80% of my users are RESTRICTED USERs and as such can not make changes to the ALL USERS profile.
Microsoft Direct Access support suggested the following .JS:
oShell = Wscript.CreateObject("WScript.Shell");
CmdResult = oShell.run("runas /user:username", "yourbatchtodelitemsfromALLUSERS", " ",2,false);
wscript.sleep 1000;
Shell.AppActivate "C:\WINNT\System32\runas.exe";
oShell.sendkeys "password~";
oShell = Nothing;
but I was unable to get it to work after many attempts and minor revisions. Some VB scripting buddies indicated that this .JS would not work in a logon script environment and they thought it was designed for a web page. They suggested using VBScript IMPERSONATE would be a better way to go but I have never written VBScript and I thought it likely already exists somewhere.
FYI, I used to write a fair amount of VFPro and .BAT scriping but do not know much about VBScript or JScript.
Any assistance would be greatly appreciated.
Ian Matthews
MCSE2001, IPD, BComm
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only