Page 1 of 1 1
Topic Options
#161128 - 06/04/25 10:46 AM loading registry.reg file when login
marceld Offline
Lurker

Registered: 06/04/25
Posts: 2
Hello

first off all WELCOME everyone!
Iam new on this forum!

For my project @ school i have to make changes in the Windows XP desktop and more... the onyl way to do them all was with a registry file.. When i run it, it all works perfect. But my question is:
How can i load this with kixtart on a network ??

i found this is this ok and does it work ?:

;
; laadkey.KIX
; dit zorgt ervoor dat de keys geladen worden in het register.
;

break on

$ReturnCode = LoadKey("HKEY_CURRENT_USER\EZReg", "c:\marcel\netwerk-policy-settings.reg")
If $ReturnCode = 0
? "Key loaded...."
Endif

i saved this as a netwerk-policy-settings.reg.

So does this work?????

Thanks alot !

Top
#161129 - 06/04/25 11:32 AM Re: loading registry.reg file when login
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 02/05/13
Posts: 303
Loc: STRASBOURG, France
hi,

LoadKey is a function to load a registry file like ntuser.dat, not to import a .reg file.

You need a command like :

Code:
$regfile = ""c:\marcel\netwerk-policy-settings.reg"
shell 'regedit /s "'+$filename+'"'



Take care that with this method, parameters are applied definitively in the registry.

For non-permanent modifications, you should use AD policies.
_________________________
Christophe

Top
#161130 - 06/04/25 11:45 AM Re: loading registry.reg file when login
Mart Moderator Offline
KiX Supporter
*****

Registered: 02/03/27
Posts: 4590
Loc: The Netherlands
Depending on what keys should be written to importing a registry file will fail or will be successful. A regular user can not write to for example the HKEY_LOCAL_MACHINE part of the registry in Win2K and up.
It might be an option to use writevalue. It all depends on what you want to write, where to write it, who is going to do the changes and how many registry changes should be done.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#161131 - 06/04/25 01:02 PM Re: loading registry.reg file when login
marceld Offline
Lurker

Registered: 06/04/25
Posts: 2
Thx you 2
I testen those registry settings on my own workstation that is in a domain and they worked for me. it are settings like :
Dont group simular programma's in the taskbar and add some defualt icons on desktop etc.
I have all of those in a reg file as you know and i just want it to load when a user logs in.

so this :

$regfile = ""c:\marcel\netwerk-policy-settings.reg"
shell 'regedit /s "'+$filename+'"'

Should work then with kixtart ?

thanks alot!

Top
#161132 - 06/04/25 01:27 PM Re: loading registry.reg file when login
Mart Moderator Offline
KiX Supporter
*****

Registered: 02/03/27
Posts: 4590
Loc: The Netherlands
It still depends on the keys you want to write to.
Two questions:

- Are you and/or your users (local) administrator? Regular users can not write to for example HKEY_LOACL_MACHINE in Win2K and up admins can.
- Do all users have access to the c:\marcel folder? It would be easier to place the .reg file on the netlogon share so users can access it without changing permissions on folders.


Edited by Mart (06/04/25 01:27 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 72 anonymous users online.
Newest Members
FredR, jhirche, MarcSant, Daniel_9_jr, Ralf_Mueller
17368 Registered Users

Generated in 0.037 seconds in which 0.013 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