Guest salan Posted November 8, 2007 Posted November 8, 2007 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\Windows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF ;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3","1803","00000003","REG_DWORD") ENDIF ;Execute local Printers call $local
BaccyNet Posted November 8, 2007 Posted November 8, 2007 Hi there and welcome to the wonders of education IT!! 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
m2d2 Posted November 8, 2007 Posted November 8, 2007 ;if ingroup(NoInternet) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF ;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3","1803","00000003","REG_DWORD") ENDIF Why have you commented out the if statements?
Guest salan Posted November 8, 2007 Posted November 8, 2007 ;if ingroup(NoInternet) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings","ProxyServer","127.0.0.1:8080","REG_SZ") ENDIF ;if ingroup(NoDownloads) WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\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
BaccyNet Posted November 8, 2007 Posted November 8, 2007 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: ; 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\Windows\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\Windows\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
Guest salan Posted November 8, 2007 Posted November 8, 2007 Thanks for the replies. Can anyone reccomend, or point me to any books/white papers/downloads on these scripts and examples? Alan
ChrisH Posted November 8, 2007 Posted November 8, 2007 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.
steve Posted November 8, 2007 Posted November 8, 2007 Good place to start is: http://helpdesk.kixtart.org/ and http://www.scriptlogic.com/kixtart/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now