Page 1 of 1 1
Topic Options
#154484 - 2006-01-03 03:45 PM adding .reg file to login.
BarryWhite Offline
Fresh Scripter

Registered: 2005-10-24
Posts: 35
Loc: UK
Hello all and happy new year.
I'm converting an old login script to kix and need to merge some .reg files into users profiles in terminal services during login.
At the moment all users have registry tools enabled in groip policy which i would like to disable after I have got the reg changes to work.
I've tried this but it doesn't seem to work.
shell '%comspec% /c regedit /s @lserver + "\sysvol\domainname.local\scripts\regsettings.reg"'
Is there an easier whay to do this?

Cheers

Top
#154485 - 2006-01-03 04:21 PM Re: adding .reg file to login.
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Is there an easier way to do this ? That would depend - how many pokes you got in that reg file there ?

Was this poke being done in your "old" login script ? If so - show us the original lines.

Top
#154486 - 2006-01-03 04:23 PM Re: adding .reg file to login.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, you could merge directly with kix or with the reg-merging udf.
you can continue using those after you disable registry editing tools.

but, as you got the basic thingie working, you might be easiest of with it.
to simplify it for ya, this is fine:
shell 'regedit /s "' + @lserver + '\sysvol\domainname.local\scripts\regsettings.reg"'

and not 100% sure on this as haven't got a single logonscript running in my home network but this should do the same, but better:
shell 'regedit /s "' + @ldrive + 'regsettings.reg"'

that is if the path you have the regsettings.reg in is the logonscript directory.
_________________________
!

download KiXnet

Top
#154487 - 2006-01-03 04:38 PM Re: adding .reg file to login.
BarryWhite Offline
Fresh Scripter

Registered: 2005-10-24
Posts: 35
Loc: UK
There are quite a few settings, these are relateted to Videss software which is apparantly very fussy about screen settings. Now I don't know exactly how many of these settings below are actually required to change as the original script just merged from an exported correct setting.

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ActiveWndTrkTimeout"=dword:00000000
"AutoEndTasks"="0"
"CaretWidth"=dword:00000001
"CoolSwitch"="1"
"CoolSwitchColumns"="7"
"CoolSwitchRows"="3"
"CursorBlinkRate"="530"
"DragFullWindows"="0"
"DragHeight"="4"
"DragWidth"="4"
"FontSmoothing"="2"
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000001
"ForegroundFlashCount"=dword:00000003
"ForegroundLockTimeout"=dword:00000000
"GridGranularity"="0"
"HungAppTimeout"="5000"
"LowPowerActive"="0"
"LowPowerTimeOut"="0"
"MenuShowDelay"="400"
"PaintDesktopVersion"=dword:00000000
"Pattern"="(None)"
"PowerOffActive"="0"
"PowerOffTimeOut"="0"
"ScreenSaveActive"="0"
"ScreenSaverIsSecure"="1"
"ScreenSaveTimeOut"="600"
"TileWallpaper"="0"
"UserPreferencesMask"=hex:9e,1e,01,80
"WaitToKillAppTimeout"="20000"
"Wallpaper"="(None)"
"WheelScrollLines"="3"
"LameButtonEnabled"=dword:00000008
"LameButtonText"="Comments?"
"SmoothScroll"=dword:00000000

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"BorderWidth"="-15"
"CaptionFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,\
00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"CaptionHeight"="-285"
"CaptionWidth"="-240"
"IconFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"IconSpacing"="-1125"
"IconTitleWrap"="1"
"IconVerticalspacing"="-1125"
"MenuFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"MenuHeight"="-285"
"MenuWidth"="-270"
"MessageFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"ScrollHeight"="-210"
"ScrollWidth"="-210"
"Shell Icon BPP"="16"
"SmCaptionFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,\
00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SmCaptionHeight"="-285"
"SmCaptionWidth"="-225"
"StatusFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"AppliedDPI"=dword:00000060
"Shell Icon Size"="32"

Top
#154488 - 2006-01-03 04:44 PM Re: adding .reg file to login.
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
hmmm, you could convert these into WriteValue function calls. But I think you got enough there to warrant keeping them as regedit pokes (my opinion).

Show us the orginal lines from the old login script.

Top
#154489 - 2006-01-03 04:46 PM Re: adding .reg file to login.
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
sorry - you said you want to disable regedit at the end-of-day ? That changes things totally ...
Top
#154490 - 2006-01-03 04:53 PM Re: adding .reg file to login.
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
If you really want to disable regedit at the end-of-the-day - and want to use Kixtart, then you will have to hand-job all the pokes into seperate WriteValue function calls, here is an example taken from your file ... one shows how to poke a DWORD and the other shows how to poke a BINARY (hex) value:

Code:

Break On

$= WriteValue("HKCU\Control Panel\Desktop", "ActiveWndTrkTimeout", 0, "REG_DWORD")

$= WriteValue("HKCU\Control Panel\Desktop\WindowMetrics", "CaptionFont",
"f5ffffff000000000000000000000000bc020000
00000001000000005400610068006f006d0061000
00000000000000000000000000000000000000000
00000000000000000000000000000000000000000
000000000000000000000",
"REG_BINARY")

Exit 0



Like Jooel said, there is a UDF that will read a reg file and automate the poking for you ... whats it called again anybody ? Think Jim wrote it.

-Shawn

Top
#154491 - 2006-01-03 05:01 PM Re: adding .reg file to login.
BarryWhite Offline
Fresh Scripter

Registered: 2005-10-24
Posts: 35
Loc: UK
Cheers Jooel and Shawn,
The code below looks like it works fine, I'll do some tests.
shell 'regedit /s "' + @ldrive + 'regsettings.reg"'

Thats the problem if I disable regedit in group policy, I get a popup message saying reg tools are disabled. Don't really want to add all the settings in manually as they have a few more .reg files as well.
I will have a look for the UDF file and try it out.
Cheers


Edited by BarryWhite (2006-01-03 05:08 PM)

Top
#154492 - 2006-01-03 05:22 PM Re: adding .reg file to login.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
the one by jtokach is bad as it uses fso.
I'm just trying to search for the public coding thread of the tournament III that has proper kixtart only UDF's for that.
google fails to find it though.
only finds the private and results threads. still searching.
_________________________
!

download KiXnet

Top
#154493 - 2006-01-03 05:29 PM Re: adding .reg file to login.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, posting the code as UDF.
_________________________
!

download KiXnet

Top
#154494 - 2006-01-03 05:48 PM Re: adding .reg file to login.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=154038
_________________________
!

download KiXnet

Top
#154495 - 2006-01-03 06:08 PM Re: adding .reg file to login.
BarryWhite Offline
Fresh Scripter

Registered: 2005-10-24
Posts: 35
Loc: UK
Top man Jooel,
I'll give it a bash and see what happens.

Cheers Jooel and Shawn for pointing me in the right direction..

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.106 seconds in which 0.07 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org