I have run into this before. Reinstall wsh that should fix it Sent from my iPhoneOn Jul 3, 2009, at 7:08, "Andrew Wood" <andrew.wood@xxxxxxxxxxxxxxxx> wrote:
For the DIM - that shouldn’t matter – you’d only really need it if you’d put explicit references in – which Steve hasn’tThat code looked fine to me – and it works on my 2003 server when I cut and pasted it into a .vbs scriptThere’s not some funny text/typo in the script you’re running?From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Joe ShonkSent: 03 July 2009 06:06 To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: VBscript help needed Try removing “Dim objShell” from the script and try again. JoeFrom: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Steve SnyderSent: Thursday, July 02, 2009 9:14 PM To: thin@xxxxxxxxxxxxx Subject: [THIN] VBscript help neededWrote (okay, plagarized and cobbled) a script to perform an action based on the user being in a group; runs great on my XP PC, but on a W2K3 server itbombs out on the lineSet objShell = WScript.CreateObject("WScript.Shell") with an Invalid Syntax error. Ideas? 'begin here GroupName="no_internet-gp" Set objSysInfo = CreateObject("ADSystemInfo") strUserInfo = "LDAP://" & objSysInfo.UserName Set objUser = GetObject(strUserInfo) arrMember=Filter(objUser.MemberOf ,GroupName) Dim objShell, RegLocate, RegLocate1 Set objShell = WScript.CreateObject("WScript.Shell") On Error Resume Next If ubound(arrMember) Then wscript.Quit If Err.Number <> 0 Then WScript.echo Err.Description ElseRegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows \CurrentVersion\Internet Settings\ProxyEnable"objShell.RegWrite RegLocate,"1","REG_DWORD"RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows \CurrentVersion\Internet Settings\ProxyServer"objShell.RegWrite RegLocate,"127.0.0.1:80","REG_SZ"RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows \CurrentVersion\Internet Settings\ProxyOverride" objShell.RegWrite RegLocate,"etimesheets.*;smdc*; 164.49.*;<local>","REG_SZ"End If 'end here