[THIN] Re: VBscript help needed

  • From: "Braebaum, Neil" <Neil.Braebaum@xxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Fri, 3 Jul 2009 15:21:10 +0100

Reinstalling wsh? On 2003 server?
 
Neil


________________________________

        From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Magnus Hjorleifsson
        Sent: 03 July 2009 14:46
        To: thin@xxxxxxxxxxxxx
        Subject: [THIN] Re: VBscript help needed
        
        
        I have run into this before. Reinstall wsh that should fix it
        
        Sent from my iPhone

        On 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't

                

                That code looked fine to me - and it works on my 2003
server when I cut and pasted it into a .vbs script 

                

                There's not some funny text/typo in the script you're
running?

                

                From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Joe Shonk
                Sent: 03 July 2009 06:06
                To: <mailto:thin@xxxxxxxxxxxxx> thin@xxxxxxxxxxxxx
                Subject: [THIN] Re: VBscript help needed

                

                Try removing "Dim objShell" from the script and try
again.

                

                Joe

                

                From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Steve Snyder
                Sent: Thursday, July 02, 2009 9:14 PM
                To: <mailto:thin@xxxxxxxxxxxxx> thin@xxxxxxxxxxxxx
                Subject: [THIN] VBscript help needed

                

                Wrote (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 line

                

                Set 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 
                Else
                  RegLocate =
"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



*****************************************************************************

This email and its attachments are confidential to the intended recipient. If 
this has come to you in error, please notify the sender immediately and delete 
this email from your system. You must take no action based on this email, nor 
must you copy or disclose it or any part of its contents to any person or 
organisation. Please note that email communications may be monitored. The 
registered office of Shop Direct Limited is First Floor, Skyways House, Speke 
Road, Speke, Liverpool, L70 1AB, registered number 04730752.
 
Subsidiary companies of Shop Direct Limited include:

Shop Direct Group Financial Services Limited (SDGFS), Shop Direct Financial 
Services Limited (SDFS) and Shop Direct Finance Company Limited (SDFC). The 
registered office of SDGFS, SDFS and SDFC is Aintree Innovation Centre, Park 
Lane, Netherton, Bootle, L30 1SL, registered numbers 05200103 (SDGFS), 04730706 
(SDFS) and 04660974 (SDFC). SDFS and SDFC are authorised and regulated by the 
Financial Services Authority in respect of arranging insurance products. 

Shop Direct Contact Centres Limited (SDCC) and Shop Direct Home Shopping 
Limited (SDHS). The registered office of SDCC and SDHS is First Floor, Skyways 
House, Speke Road, Speke, Liverpool, L70 1AB, registered numbers 05330323 
(SDCC), 04663281 (SDHS). 

All companies registered in England.

*****************************************************************************

Other related posts: