Help with KIX script please
Hi All,
New to educational enviornment but not IT (Been in WAY too long!!! lol).
I am on the steep learning curve with a few things but could do with some help with adding a reg key via a KIX script.
We have a ligin.kix that runs and maps drives, and writes certain reg entries.
I want to add a website tothe allowed popups reg entry on all machines.
Trouble is when I tried to do this, I broke the script! The script did not run anything after the entry.
Soooo, Can anyone give me an example of what I should be putting?
Here is the script that we use (remember that I have JUST taken over so still in the ' if it works LEAVE IT and sort out the fires! mode).
Alan
; Zentek Computers
; Kix 2000 Script
; To Allow Changes at " Current User "
; Maps Drives , Changes Local Printers , Changed Registry
$local="c:\local.prt"
break off
; Mapping drives for Win2k,WinXP and Win9x
use p: "\\server\apps$"
use s: "\\server\classwork$"
;if ingroup(NoInternet) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF
;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings\Zones\3","1803","00000003","REG_DWORD") ENDIF
;Execute local Printers
call $local
Re: Help with KIX script please
Hi there and welcome to the wonders of education IT!! :D
Can you attach the kix script itself to a post please? I think I can see where it is going wrong but with the formatting of the forum it's making it a little hard to read. Also I'm not sure if that is all the script being shown or if theres more.
Steve :)
Re: Help with KIX script please
Quote:
Originally Posted by salan
;if ingroup(NoInternet) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF
;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings\Zones\3","1803","00000003","REG_DWORD") ENDIF
Why have you commented out the if statements?
Re: Help with KIX script please
Quote:
Originally Posted by m2d2
Quote:
Originally Posted by salan
;if ingroup(NoInternet) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF
;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings\Zones\3","1803","00000003","REG_DWORD") ENDIF
Why have you commented out the if statements?
Hi,
I havn't!
this is the script as it stands now.
As it happens, I have used GPO to do what I am after, but I would still like to know how to add things to the KIX scripts.
Alan
Re: Help with KIX script please
Basically any line that has a ; before it is treated as a comment. From the code that you have posted, I think what you are after is:
Quote:
; Zentek Computers
; Kix 2000 Script
; To Allow Changes at " Current User "
; Maps Drives , Changes Local Printers , Changed Registry
$local="c:\local.prt"
break off
; Mapping drives for Win2k,WinXP and Win9x
use p: "\\server\apps$"
use s: "\\server\classwork$"
;Redirect no Internet group
If (InGroup("NoInternet")=1) OR (InGroup("NoInternet")=2)
If WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings", "ProxyServer", "127.0.0.1:8080", "REG_SZ") = 0
? "Registry value written"
EndIf
EndIf
;Stop users from downloading
If (InGroup("NoDownloads")=1) OR (InGroup("NoDownloads")=2)
If WriteValue("HKEY_CURRENT_USER\Software\Microsoft\W indows\CurrentVersion\Internet Settings\Zones\3", "1803", "00000003", "REG_DWORD") = 0
? "Registry value written"
EndIf
EndIf
;Execute local Printers
call $local
Hopefully that should fix the problem.
Steve
Re: Help with KIX script please
Re: Help with KIX script please
Thanks for the replies. Can anyone reccomend, or point me to any books/white papers/downloads on these scripts and examples?
Alan
Re: Help with KIX script please
You may want to look at converting to VB script. Theres nothing in that script that couldnt easily be ported over. There is plenty of VB script knowledge and examples on this site.
Re: Help with KIX script please