Question : AD Login Script not working on Windows 7 - but will run locally from same computer

I have a vbs script that I have created that will log the users name, IP, machine name.  I have it setup under the users account in AD and on some of the computers that I have tested this with I did a gpupdate /force and had them reboot.  When I check the log there isn't any new informaiton in there.  If the user goes to the temporary spot that I have for the script and double click on it, it will run like it should and log the information in the text file.  Attached is what the path looks like in AD Group Policy Editor.  Everyone has the "I" drive mapped to their computer.  Thanks in advance for your help!

Answer : AD Login Script not working on Windows 7 - but will run locally from same computer

Here is the script.  You need to use two arguments with it ie Win7UAC /Disable /Supress .  

McKnife I get what you said about the drivemapping part, but thats all we use logon scripts for so that was my mistatment.  

McKnifee,Rob
  Do you know of urls that would show me how to make UAC friendly VBS?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2009
'
' NAME: 
'
' AUTHOR: duh , 
' DATE  : 8/13/2009
'
' COMMENT: 
'
'==========================================================================
 
Dim oShell : Set oShell = CreateObject("WScript.Shell")
Dim sDisableUAC : sDisableUAC = "%windir%\System32\cmd.exe /k %windir%\System32\reg.exe"&_ 
                                " ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"&_
                                " /v EnableLUA /t REG_DWORD /d 0 /f"
Dim sSupressElevationWrn : sSupressElevationWrn = "%windir%\System32\cmd.exe /k %windir%\System32\reg.exe"&_
                                                   " ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\"&_
                                                   "CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin"&_
                                                   " /t REG_DWORD /d 0 /f"
Dim sEnableUAC : sEnableUAC = "%windir%\System32\cmd.exe /k %windir%\System32\reg.exe ADD "&_
							  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System "&_
							  "/v EnableLUA /t REG_DWORD /d 1 /f"
    
Dim sEnableElevationWrn : sEnableElevationWrn = "%windir%\System32\cmd.exe /k %windir%\System32\reg.exe "&_
						 					    "ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"&_
						 					    " /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f"
			
If WScript.Arguments.Count < 2 Then
	Display_Help ()
Else  
	Run_Script ()
End If  
Sub Display_Help ()
	WScript.Echo "*******************************************" 
	WScript.Echo "*              Win7UAC Usage              *"
	WScript.Echo "*Win7UAC {UAC setting} {Elvation Consents}*"
	WScript.Echo "*ie  Win7UAC /Disable /Supress            *"
	WScript.Echo "*******************************************"
	WScript.Echo "/?       --Displays Usage"
	WScript.Echo "/Disable --Disables UAC"
	WScript.echo "/Enable  -- Enables the UAC"
	WScript.Echo "/Supress -- Supresses the Elvation Consent Messages"
	WScript.Echo "/Elevate -- Re-Enables Elevation Consent Messages"
End Sub
Sub Run_Script ()
Dim sArg1 : sArg1 = LCase(Replace(wscript.Arguments.Item(0),"/",""))
Dim sArg2 : sArg2 = LCase(Replace(wscript.Arguments.Item(1),"/",""))
'Handle UAC
'=============================================================================================
If sArg1 = "disable" Then
	oShell.Exec sDisableUAC
Else If sArg1 = "enable" Then
	oShell.Exec sEnableUAC
End If
End If
'=============================================================================================
'Hanlde Elevation Supression
'=============================================================================================
If sArg2 = "supress" Then
	oShell.Exec sSupressElevationWrn
Else If sArg2 = "elevate" Then
	oShell.Exec sEnableElevationWrn
End If
End If
'=============================================================================================
 
End Sub
'oShell.Exec sDisableUAC
'oShell.Exec sSupressElevationWrn						 					    
Random Solutions  
 
programming4us programming4us