Sysprep and Custom Registry Settings

D

Doug

I have created a base image with XP SP1. Some of our
application require custom access on cretain registry
keys.

When I run sysprep with the following switches -reseal -
mini -quiet -forceshutdown the custom access on the
registry keys are stripped off the default.

Is there a way to stop sysprep from removing custom
registry settings access?

Thanks
 
B

Bill Curtis [MSFT]

No. There isn't a way that you can tell Sysprep not to change registry
settings. What I usually do is create a batch file that runs from
CMDLINE.TXT or GUIRUNONCE and inserts the registry entries that you need.

I don't know if this will help as I don't know the location (and security)
of the registry keys that you wish to alter, but here are some instructions
that I wrote a while back on how to set XP's Page File to "System Managed"
after reboot from Sysprep.



Scripting the Pagefile Size:


1.. Right-Click "My Computer" and select "Properties"
2.. Select the "Advanced" tab and then click on the "Settings" button
under "Performance".
3.. Select the "Advanced" tab and then click on the "Change" button
under "Virtual Memory".
4.. Select the "System Managed size" radio button and then click ok.
5.. Highlight the following registry key value in Regedit:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\PagingFiles



6.. Choose FILE and then EXPORT
7.. Export this registry hive as memory.reg to C:\Windows
8.. Open up C:\Sysprep\Sysprep.inf in notepad and make the following
addition under [GuiRunOnce] key:


[GuiRunOnce]



"reg import %WINDIR%\memory.reg"

"reg import %WINDIR%\kerneldump.reg"





9.. Save Sysprep.inf
10.. Upon rebooting, the registry file will be added into the registry.
 
M

Mike Brannigan [MSFT]

If you cannot prevent the removal of the settings then you could replace
them by making a reg file and running a script on the RunOnce key so that
they are added back on the reboot after you have syspreped.

See Microsoft Knowledgebase article 314866

--
Regards,

Mike
--
Mike Brannigan [Microsoft]

This posting is provided "AS IS" with no warranties, and confers no
rights

Please note I cannot respond to e-mailed questions, please use these
newsgroups
 
D

Doug

I know how to add a reg key with cmdlines.txt. How do you
add permissions to an existing key in cmdlines.txt

Thanks


-----Original Message-----
No. There isn't a way that you can tell Sysprep not to change registry
settings. What I usually do is create a batch file that runs from
CMDLINE.TXT or GUIRUNONCE and inserts the registry entries that you need.

I don't know if this will help as I don't know the location (and security)
of the registry keys that you wish to alter, but here are some instructions
that I wrote a while back on how to set XP's Page File to "System Managed"
after reboot from Sysprep.



Scripting the Pagefile Size:


1.. Right-Click "My Computer" and select "Properties"
2.. Select the "Advanced" tab and then click on the "Settings" button
under "Performance".
3.. Select the "Advanced" tab and then click on the "Change" button
under "Virtual Memory".
4.. Select the "System Managed size" radio button and then click ok.
5.. Highlight the following registry key value in Regedit:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Sessio n Manager\Memory
Management\PagingFiles



6.. Choose FILE and then EXPORT
7.. Export this registry hive as memory.reg to C:\Windows
8.. Open up C:\Sysprep\Sysprep.inf in notepad and make the following
addition under [GuiRunOnce] key:


[GuiRunOnce]



"reg import %WINDIR%\memory.reg"

"reg import %WINDIR%\kerneldump.reg"





9.. Save Sysprep.inf
10.. Upon rebooting, the registry file will be added into the registry.



--
- Bill Curtis [MSFT]
"This posting is provided "AS IS" with no warranties, and confers no
rights."



Doug said:
I have created a base image with XP SP1. Some of our
application require custom access on cretain registry
keys.

When I run sysprep with the following switches -reseal -
mini -quiet -forceshutdown the custom access on the
registry keys are stripped off the default.

Is there a way to stop sysprep from removing custom
registry settings access?

Thanks


.
 
G

George Ellis

I would use a custom security template. Start MMC, add the Security
Template add-in, and create a new template. You can find the keys and set
the permissions as you wish. Save the inf (template) and use it with this
in cmdlines.txt or some other post setup installation:

cmd /c secedit /configure /DB "c:\my stuff\my template.sdb" /CFG "c:\my
stuff\my template.inf" /verbose


Doug said:
I know how to add a reg key with cmdlines.txt. How do you
add permissions to an existing key in cmdlines.txt

Thanks


-----Original Message-----
No. There isn't a way that you can tell Sysprep not to change registry
settings. What I usually do is create a batch file that runs from
CMDLINE.TXT or GUIRUNONCE and inserts the registry entries that you need.

I don't know if this will help as I don't know the location (and security)
of the registry keys that you wish to alter, but here are some instructions
that I wrote a while back on how to set XP's Page File to "System Managed"
after reboot from Sysprep.



Scripting the Pagefile Size:


1.. Right-Click "My Computer" and select "Properties"
2.. Select the "Advanced" tab and then click on the "Settings" button
under "Performance".
3.. Select the "Advanced" tab and then click on the "Change" button
under "Virtual Memory".
4.. Select the "System Managed size" radio button and then click ok.
5.. Highlight the following registry key value in Regedit:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Sessio n Manager\Memory
Management\PagingFiles



6.. Choose FILE and then EXPORT
7.. Export this registry hive as memory.reg to C:\Windows
8.. Open up C:\Sysprep\Sysprep.inf in notepad and make the following
addition under [GuiRunOnce] key:


[GuiRunOnce]



"reg import %WINDIR%\memory.reg"

"reg import %WINDIR%\kerneldump.reg"





9.. Save Sysprep.inf
10.. Upon rebooting, the registry file will be added into the registry.



--
- Bill Curtis [MSFT]
"This posting is provided "AS IS" with no warranties, and confers no
rights."



Doug said:
I have created a base image with XP SP1. Some of our
application require custom access on cretain registry
keys.

When I run sysprep with the following switches -reseal -
mini -quiet -forceshutdown the custom access on the
registry keys are stripped off the default.

Is there a way to stop sysprep from removing custom
registry settings access?

Thanks


.
 
Joined
Jun 29, 2007
Messages
1
Reaction score
0
Great

George Ellis, your solution is the best! I did it, and now, it works so fine!

Tks!


George Ellis said:
I would use a custom security template. Start MMC, add the Security
Template add-in, and create a new template. You can find the keys and set
the permissions as you wish. Save the inf (template) and use it with this
in cmdlines.txt or some other post setup installation:

cmd /c secedit /configure /DB "c:\my stuff\my template.sdb" /CFG "c:\my
stuff\my template.inf" /verbose


"Doug" wrote in message
news:[email protected]...
> I know how to add a reg key with cmdlines.txt. How do you
> add permissions to an existing key in cmdlines.txt
>
> Thanks
>
>
>
> >-----Original Message-----
> >No. There isn't a way that you can tell Sysprep not to

> change registry
> >settings. What I usually do is create a batch file that

> runs from
> >CMDLINE.TXT or GUIRUNONCE and inserts the registry

> entries that you need.
> >
> >I don't know if this will help as I don't know the

> location (and security)
> >of the registry keys that you wish to alter, but here are

> some instructions
> >that I wrote a while back on how to set XP's Page File

> to "System Managed"
> >after reboot from Sysprep.
> >
> >
> >
> >Scripting the Pagefile Size:
> >
> >
> > 1.. Right-Click "My Computer" and select "Properties"
> > 2.. Select the "Advanced" tab and then click on

> the "Settings" button
> >under "Performance".
> > 3.. Select the "Advanced" tab and then click on

> the "Change" button
> >under "Virtual Memory".
> > 4.. Select the "System Managed size" radio button and

> then click ok.
> > 5.. Highlight the following registry key value in

> Regedit:
> >
> >
> >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Sessio

> n Manager\Memory
> >Management\PagingFiles
> >
> >
> >
> > 6.. Choose FILE and then EXPORT
> > 7.. Export this registry hive as memory.reg to

> C:\Windows
> > 8.. Open up C:\Sysprep\Sysprep.inf in notepad and

> make the following
> >addition under [GuiRunOnce] key:
> >
> >
> >[GuiRunOnce]
> >
> >
> >
> > "reg import %WINDIR%\memory.reg"
> >
> > "reg import %WINDIR%\kerneldump.reg"
> >
> >
> >
> >
> >
> > 9.. Save Sysprep.inf
> > 10.. Upon rebooting, the registry file will be added

> into the registry.
> >
> >
> >
> >--
> >- Bill Curtis [MSFT]
> >"This posting is provided "AS IS" with no warranties, and

> confers no
> > rights."
> >
> >
> >
> >"Doug" wrote in message
> >news:[email protected]...
> >> I have created a base image with XP SP1. Some of our
> >> application require custom access on cretain registry
> >> keys.
> >>
> >> When I run sysprep with the following switches -reseal -
> >> mini -quiet -forceshutdown the custom access on the
> >> registry keys are stripped off the default.
> >>
> >> Is there a way to stop sysprep from removing custom
> >> registry settings access?
> >>
> >> Thanks
> >>

> >
> >
> >.
> >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top