I have the following code, I think lines 1-3 and 9 are working okay. I have to implement these settings via kixtart for our Citrix server users, the bosses don't want me to use exported/imported reg keys or Group policy. Basically, I have to set users proxy settings, set their home page, disable their ability to change proxy settings (under LAN settings) in internet options. Set IE cache folder sizes, stop the Internet Connection Wizard icon appearing on their desktop (or if they launch IE) after logging in. Finally prevent the configure your server wizard starting up/appearing when they log in (domain users have local admin rights - a fix for two old programs we use). Code:
#162643 - 2006-05-3009:15 PMRe: applying some registry settings via login script
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: Space
Well you can run this script from a DOS console and see if an error is being returned or not.
I'm not sure but it could also be that the keys are not available in time for the logon to process HKCU with this script but if so then you should get an error as well.
I have still have one problem which relates to the last line of code in my original script posting. By that I mean the script is not inserting a correct value into the registry, how would I represent the hex value shown below?
So simple I completely overlooked it, d'oh. Anyway now I am close to implementing a test of the scripts. However, another problem has occurred. I have 18 lines of code such as the following,
I need to be able to load only some of the settings, per group and depending on the sub net the user is in (that I have a good idea how to do). My question is, is it possible to call functions from other scripts, for example for user A, when they log in settings from functions 1 and 3 are loaded. for user B, only function2. for user C, all three functions are loaded. Currently I have had to put my lines of code into various scripts for each group, I want to group these scripts into one. In other words can I insert into my main login script something like call "function1" + "scriptname" or is there something else I can use. I have checked the manual + various postings but I could not find anything. I know the above won't work, its just to give an idea.
#162647 - 2006-06-0107:24 PMRe: applying some registry settings via login script
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: Space
Yes, just do a break down of what is common to each group (i.e. something that is applied to all)
Then do If InGroup('group1) FunctionA() EndIf If InGroup('group2) FunctionB() EndIf If InGroup('group3) FunctionC() EndIf
Where functiona A,B,C have different setting, or just make it part of the Select Case without a function but using a function allows you to more easily say who and when it's ran.
Then also add in the IPAddress check as part of it too.
Well.... I have several lines of registry settings (more than I originally posted) which I do add via the writevalue command. I thought you could select them from another script via a call command and use a function command to select a particular set inside that script(I it take that this is wrong then, I am new at scripting) I have planned to have several sets of registry settings in one script. So although I can call an entire (seperate) script from within my main script, I want to be able to select which chunk of code is loaded from my second script - is this possible? I do not want to end up having four or five scripts floating around.
#162651 - 2006-06-0212:44 PMRe: applying some registry settings via login script
MartMart KiX Supporter
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Sure. If you call the file that has all the functions in it you can use these functions separately. Let’s say that the functions file contains two functions one called function1 and one called function2 then you could do something like this.
Code:
;call the functions file. Call "path and filename of your functions file" ; ; ;some other stuff happening here. ; ; ;time to use the functions in the function file you called above. $rc = Function1(optional some parameters here) $rc = Function2(optional some parameters here)