|
guys, i am using the script below for this same IE restiction job that i saw somewhr. Apart from the If INGroup that successfully map the drive, the rest of the script (supposed to input fake proxy for the user if he/she is in that group) doesn't work. what possibly am i doing wrong that is preventing that portion not to work. Help please.
If Not @LogonMode Break On Else Break Off EndIf Dim $SO $SO=SetOption('Explicit','On') $SO=SetOption('NoVarsInStrings','On') $SO=SetOption('NoMacrosInStrings','On') $SO=SetOption('WrapAtEOL','On') Dim $NoCache, $x $NoCache = DelKey('HKCU\Software\KiXtart\TokenCache')
If InGroup(@Domain+'\IE Restricted')
use Z: /DEL /PERSISTENT use Z: "\\wgs-it005\departments"
Dim $Key1, $Key2, $Set, $Key1 = 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings' $Set = WriteValue($Key1,"ProxyServer","proxy:80",REG_SZ) If @ERROR 'Error updating key [ProxyServer] : ' + @ERROR + ' - ' + @SERROR ? EndIf $Set = WriteValue($Key1,"ProxyEnable",1,REG_DWORD) If @ERROR 'Error updating key [ProxyEnable] : ' + @ERROR + ' - ' + @SERROR ? EndIf $Set = WriteValue($Key1,"ProxyOverride","127.0.0.1;<local>",REG_SZ) If @ERROR 'Error updating key [ProxyOverride] : ' + @ERROR + ' - ' + @SERROR ? EndIf $Set = WriteValue('HKCU\SOFTWARE\Policies\Microsoft\Windows\Internet Explorer\Control Panel','Proxy',1,REG_DWORD) If @ERROR 'Error updating key [Proxy] : ' + @ERROR + ' - ' + @SERROR ? EndIf
EndIf
|