Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

Sign in to follow this  

Program for adding registry/modifying entires?

Recommended Posts

Hi all,

Does anyone know of a program I can use to merge entries aswell as set permissions for those entires?


I can do the former, but it's not automatic and and the permissions are not carried over neither.


Any suggestions?





Share this post

Link to post
Share on other sites

Hi and thanks for the reply.


I was hoping for a gui to do this. Essentially I wanted to add x.reg to registry via unnattended runonce command and update the permissions.


So far I'm using the below command via CMD.exe box:

%SYSTEMROOT%\REGEDIT.EXE /S %SYSTEMROOT%\Documents and Settings\Owner\Desktop\activate.reg

This works now.


but how do I go about integrating this with runonce in nlite? using .bat perhaps?


Thanks again in meantime :hello:

Edited by shorterxp

Share this post

Link to post
Share on other sites

Hi again.


Thanks that link is quite informative.

While not the original intention I wondered onto the Office2003 Custom Installation Page here


Only by chance did I stumble upon the "Add/Remove registry entries" page within Custom Installation Wizard utility while transforming office install!

Theres a page in there that allows for importing .reg files automatically... which is what I meant by GUI...


May as well add keys this way if the MSI is automated.


Offtopic: Does \$1\ directory represent default windows installation dir, judging by the link above, I think 'XPCD' represents final nlite cd (image) and that I should copy the transformed.msi aswell as all necessary office setup files to C:\XPCD\$OEM$\$1\install\Applications\Office2003\.

Then it instructs how to create a batch files, I'm assuming I place the .bat in the same directory, then point RunOnce (in nlite) to this .bat, if I am not mistaken?

Edited by shorterxp

Share this post

Link to post
Share on other sites

"$1" represents the Root of the target System Drive, not the "Windows" Folder.

Look again at this -


The "COMMAND.TXT' is where you place a series of Coomands to run, including any executions of a BAT/CMD file.that may need to be used. These would be where you might place (e.g.) "REG ADD" instructions inside of a BAT/CMD files.

"Runonce" done at "User First Logon".


Here's an article on installing Office (as well as further unattended info) -



Don't confuse the Office Customize adding of REG entries with the explanation I gave above. Those have to do with Office and become part of the Office Install Process, not a Generic Registry Alteration (which can apply to anything).



Share this post

Link to post
Share on other sites

Are you suggesting keys imported via office setup will be removed if office is uninstalled at later date?


Perhaps I should have been more clear; I wish to use nlite to carry out unattended operations - the guide is not clear in that respect.

Though setup manager does resemble nlite unattended section.


I prefer the  function of nlite and using %SOURCE% commands there.

In this RunOnce list theres links to a few .zip SFX and other executables which will remain on the CD.

These extract/distribute some files, though I understand I could use $1 the same way.


That to me is really the straightforward part.

I'm having trouble with command to include inside .bat file (to import .reg entry).

If I believe right, I  can use RunOnce in nlite to link to .bat and in turn the .bat adds the .reg without prompt, correct?


For example

as previously stated, I currently have a list of SFX.exe on nlite RunOnce page.

In order to automatically add .reg (without prompt) there should also be a .bat file here as well.


This .bat (currently in $OEM$\$1) is essentially a text file which resembles something like:


ECHO Adding Registry Entiries
ECHO Please wait...
REG IMPORT /s activation.reg


I'm asking if the above script correct?


If I understand correctly, if .bat and .reg are in the same directory a full <path> is not necessary in the .bat.

Therefore If I put activation.reg in prep folder (in $OEM$\$1\install)  - as well as .bat. These will be moved here upon xp installation and then RunOnce should run above script providing it is linked to via RunOnce.


As I say, I'm right now testing .bat with above script but its not adding entry. I'm testing within same dir for simplicity.


Any clues?

Many thanks

Edited by shorterxp

Share this post

Link to post
Share on other sites

Finally managed to get it working with without REG.




ECHO Adding Registry Entries
ECHO Please wait...
Start /s activation.reg

Share this post

Link to post
Share on other sites

...which automatically uses RegEdit. ;)


Now, just for grins, look inside the $OEM$. Perhaps you neglected to read this?



IOW, I didn't give you that link to explain "everything", just a starting point. Do browse the *whole* Unattended Guide.

Yep, you did *exactly* what I had explained (but a variation) using a BAT/CMD file.


I don't really have time to run through nLite scenarios to explain it all in detail ATM.

Here's the nLite screenshots (the one you reference is there) -





edit -

Correlate what the $OEM$ structure is to this -


Remember, the $OEM$ folder is copied to the %SystemDrive% (generally, C-drive) to the definition of the Subfolders (as stated in the previous links). You would probably have had to use a Variable in your BAT/CMD to indicate *where* a given File is located.

Edited by submix8c

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.