Page 1 of 1 1
Topic Options
#24163 - 2002-07-01 05:06 PM adding registry value
Lou Offline
Fresh Scripter

Registered: 2002-01-10
Posts: 13
Loc: Hunt Valley MD
Hello,

I need to make a registry entry on windows 98, and windows NT machines. I am currently running Windows NT server 4.0 sp 6a with Kixstart version 3.6. I would like to push it out in my current kixstart script. The entry that I need to make is:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]
@=""

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\kci.com]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\kci.com\devapp]
"http"=dword:00000001

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\kci.com\prodapp]
"http"=dword:00000001

Your help is much appreciated. This is hands downt the best support site I have ever gone to.

Top
#24164 - 2002-07-01 05:23 PM Re: adding registry value
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I would suggest you look at the WRITEVALUE function in the manual. It should give you ample information on doing this. If you can't get it to work, post your code for troubleshooting.

Brian

Top
#24165 - 2002-07-01 05:27 PM Re: adding registry value
Lou Offline
Fresh Scripter

Registered: 2002-01-10
Posts: 13
Loc: Hunt Valley MD
This is what I had so far but I wasn't sure the syntax of

"http"=dword:0000000

WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\kci.com\devapp", "REG_DWORD")

Top
#24166 - 2002-07-01 05:27 PM Re: adding registry value
Collin Offline
Fresh Scripter

Registered: 2002-01-18
Posts: 21
Loc: Amsterdam - NL
Looks like you have a .reg file. You can execute this .reg file with the kix command:
code:
SHELL '%COMSPEC% /C Regedit /s c:\regfile.reg'

If you don't want to get into kix, especially the WRITEVALUE finction [Smile]
_________________________
Ruud is my hero
Top
#24167 - 2002-07-01 06:00 PM Re: adding registry value
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Try:

code:
WRITEVALUE ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\kci.com\devapp","http",1,"REG_DWORD")

If you need to add a key, you can check it with KEYEXIST and add it with ADDKEY. Otherwise, WRITEVALUE will not work if the key you specify does not exist.

Brian

[ 01 July 2002, 18:01: Message edited by: BrianTX ]

Top
#24168 - 2002-07-01 10:22 PM Re: adding registry value
Lou Offline
Fresh Scripter

Registered: 2002-01-10
Posts: 13
Loc: Hunt Valley MD
I went with the compsec command. I didn't know you could call reg files like that without being prompted. This is so much easier then the writevalue command. Thanks guys!
Top
#24169 - 2002-07-01 10:59 PM Re: adding registry value
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Glad you got a good solution. It's only easier because the .reg file is already in a format that you can use.. At some point we'll have to make a User-defined function that processes .reg files...

Brian

Top
#24170 - 2002-07-02 03:25 AM Re: adding registry value
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... sounndsd like you're happy with the alternative. If you ever decide to give WriteValue() another go, you need to get the parameters right. They are as follows:

WRITEVALUE ("subkey", "entry", "expression", "data type")

e.g.
$RC = WriteValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider", "CallOrder", "00000020", "REG_BINARY")
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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
1 registered (Allen) and 1047 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.107 seconds in which 0.072 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