scripting registry changes on various machines over a lan

  • Thread starter Thread starter Matthieu
  • Start date Start date
M

Matthieu

Hi there,

If I'm on the wrong group - sorry !- pls redirect me, if you can.

I would like too know if there is any possibilities of scripting registry
changes, for ex with a batch file, or with another tool ?

And is there an equivalent for regedit in DOS (cmd mode) ?

Thanks

Matthieu
 
In said:
Hi there,

If I'm on the wrong group - sorry !- pls redirect me, if you
can.

Fine. So long as it is a NTx flavor of Windows.
I would like too know if there is any possibilities of scripting
registry changes, for ex with a batch file, or with another tool

Several. (and be careful said:
And is there an equivalent for regedit in DOS (cmd mode) ?

One may use regedit.exe (NTx) to do a command-line Merge
(silent) operation (with a .REG file). "Merge" may include
deletions. There is no interactive, character-mode interface
though.

regedit.exe [/s | /e | /a] regfile "path-to-key"

/s silent (merge/import)
regedit /s <Drive:>\FolderName\FileName.reg

/e export (UNICODE)
regedit /e "<Drive:>\FolderName\FileName.reg" "KeyPath"

/a ANSI format (export)
regedit /a "<Drive:>\FolderName\FileName.reg" "KeyPath"


Remove KEY:
[-HKEY_CLASSES_ROOT\.zzz]

Remove VALUE:
[HKEY_CLASSES_ROOT\.zzz]
"InfoTip"=-

To delete the ("Default") valuename. Use:
@=-

There is also REG.EXE (MS) which is available in the Resource Kit,
Support Tools or the OS as shipped (depending on your (unstated)
OS). I generally prefer this to Regedit "4" or "5" format files
for scripted changes.

There are a few more obscure tools about, various scripting
languages may offer registry manipulation functions, and some 3rd-
party registry editing tools may have command-line interfaces.
 
In addition to Mark's suggestions you might also look at the RegWrite method
of VBScript. Bear in mind that any of these methods will likely require
local administrative rights for the user or credentials to implement them.

Get the WSH 5.6 documentation download at
http://www.microsoft.com/downloads/...48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hi there,
|
| If I'm on the wrong group - sorry !- pls redirect me, if you can.
|
| I would like too know if there is any possibilities of scripting registry
| changes, for ex with a batch file, or with another tool ?
|
| And is there an equivalent for regedit in DOS (cmd mode) ?
|
| Thanks
|
| Matthieu
|
|
 
Silent Regedit

I am trying to deploy some registry updates (.reg files) using a script file to some Windows 2000 PC's and Servers.

I am using the "/s" silent mode to do the install as described above. However, we have a couple of Citrix/terminal servers. We can manually update these servers to use the new .reg file entries, but every time a user logs onto these servers the script file runs and registry sharing error message pops up.

The problem is that the message requires the user to click "Ok" to continue the login process. I do not care that the .reg file does not update on these Servers when the user logs in, but I would like to suppress the error message from appearing. The script runs in the users login batch file, so I am unable to exclude it from running whent the user logs onto the Citrix/terminal servers, since it is needed when the users log onto a regular workstation.

The "/s" command does not seems to suppress these errors. Does anyone have any idea as to what I can do to suppress these errors from popping up?

Is there another command line string that I can use or is there another utility that I can use instead of RegEdit to deploy these registry updates that would not prompt the user with the error?
 
In said:
I am trying to deploy some registry updates (.reg files) using a
script file to some Windows 2000 PC's and Servers.

I am using the "/s" silent mode to do the install as described
above. However, we have a couple of Citrix/terminal servers. We
can manually update these servers to use the new .reg file
entries, but every time a user logs onto these servers the
script file runs and registry sharing error message pops up.

The problem is that the message requires the user to click "Ok"
to continue the login process. I do not care that the .reg file
does not update on these Servers when the user logs in, but I
would like to suppress the error message from appearing. The
script runs in the users login batch file, so I am unable to
exclude it from running whent the user logs onto the
Citrix/terminal servers, since it is needed when the users log
onto a regular workstation.

The "/s" command does not seems to suppress these errors. Does
anyone have any idea as to what I can do to suppress these
errors from popping up?
[ ]

One way is to not run the registry import operation if a TS login.
osver.exe http://internet.cybermesa.com/~bstewart/wast.html
may let you detect TS and skip the regedit.exe command.

osver /?
[...]
With -t, returns Terminal Server mode:
1 Not detected 3 Application Server mode
2 Remote Desktop mode


There are some other variations I do not recall in detail now.
Testing of existing TS-only set environment variable IIRC.
 
Windows Admin Script Tools 6.2

Thank You for pointing me to these tools. It looks like the Windows Admin Script Tools v6.2 "OSVEREX" program has solved our issue.

Thanks Again for your help!
 
In said:
Thank You for pointing me to these tools. It looks like the
Windows Admin Script Tools v6.2 "OSVEREX" program has solved our
issue.

Thanks Again for your help!

You are very welcome, but thank Bill Stewart (who wanders by from
time to time)!
 
Back
Top