Re: Change registry for all users of a machine

Posted: 03-23-2009, 07:26 PM

I am trying to alter your script so instead of having one registry entry, it
imports a completer .reg file, here is what I have come up with so far, but
guess what it doesn't work ! .... can you help please?

************************************************** *******

::@echo off
set regcmd=%SystemRoot%\system32\reg.exe
set hive=HKEY_LOCAL_MACHINE\TempHive
cd /d %USERPROFILE%\..
for /f "tokens=*" %%i in ('dir /b /ad') do (
if exist ".\%%i\NTUSER.DAT" call :AddRegValue "%%i" ".\%%i\NTUSER.DAT"

goto :EOF

set upd=Y
if /I %1 equ "All Users" set upd=N
if /I %1 equ "LocalService" set upd=N
if /I %1 equ "NetworkService" set upd=N

if %upd% equ Y (
%regcmd% load %hive% %2 >nul 2>&1
%regcmd% import file.reg >nul 2>&1
%regcmd% unload %hive% >nul 2>&1
************************************************** ***


Re: Change registry for all users of a machine

Responses to "Re: Change registry for all users of a machine"

LinkBack Thread Tools Display Modes

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge registry settings on a different machine? Ralph A. Schmid, dk5ras Windows XP Embedded 4 05-09-2007 07:45 AM
Slow change between users and unable to switch users Craig T. Windows XP Performance & Maintenance 0 01-26-2004 06:12 PM
All Users, All Users.(machine name), Default User, Linda TOO MANY!! Linda P Customize Windows XP 1 12-20-2003 05:24 PM
Change default WordPad document location for multiple users in one machine Vita young Windows XP Setup 0 12-14-2003 11:49 PM
rights and permissions change when users change their password Frank Windows XP Security & Administration 3 12-05-2003 02:29 AM