Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to install s/w though a script using alternate credentials

Status
Not open for further replies.

chouck

MIS
Jan 30, 2005
32
US
Can anyone show me what I am doing wrong. i'm trying to get mcafee to uninstall as users log on. but can not do it because you need local admin rights. I tried calling this from the user's logon script, but it still comes up w/ the "you have to be an admin to do this" message

Does anyone have any suggestions on how to remotely install/uninstall s/w from a pc using alternate credentials ?

Thanks in advance
_________________________________________________________


Option Explicit
On Error Resume Next

'constants, explicits, registry env settings
Dim macfso, macshell, macregread, macvernum, macremove

wbemimpersonationlevelimpersonate = 3
Const rem_mac = "X:\~client_updates\mcafee_451\VSC451LENS\Setup.exe REMOVE=ALL /qb!"

Set macfso = CreateObject("Scripting.FileSystemObject")
Set macshell = CreateObject("wscript.shell")
macregread = "HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan\" & _
"szCurrentVersionNumber"
macvernum = macshell.RegRead(macregread)


If macvernum = "4.5.1.1306" Then
macremove = macshell.Exec(rem_mac)
Do While macremove.Status = 0
Loop
Else

End If

Set macfso = Nothing
Set macshell = Nothing
Set macregread = Nothing
set macvernum = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top