none
Cannot seem execute runonce from sysprep.inf of POSReady system

    Question

  • As in previous WEPOS deployments, we utilize sysprep.exe and an associated sysprep.inf to customize systems. Part of this implementation is to initiate a "RunOnce" process to perform a custom system installation script. Below is an excerpt of the entries utilized from Sysprep.inf file.


    [GuiRunOnce]
        Command0 = "C:\Temp\Startup.vbs"   (This command varies as to a cmd or vbs)

    A limited solution is to create the wim with a pre-populated "RunOnce" registry entry, although this is not ideal for varying the command to be executed.

    Please Advise....
    Friday, August 14, 2009 6:58 PM

Answers

  • nwbtecheng,

    Sysprep is unable to write to [GUIRunOnce] when the Registry Filter service is enabled.  Registry Filter is a companion to File Based Write Filter (FBWF) that allows certain keys in the registry to persist from session to session when FBWF is used to create a stateless or semi-stateless system.

    In order to use GUIRunOnce you need to disable the Registry Filter service in a session prior to the session where you are running sysprep.  If you do not plan to use FBWF functionality then you can leave this service disabled, otherwise you need to re-enable after the system is restarted which can be done with GUIRunOnce itself.  You can use the REG file snippits below for this.  I have included values to enable System Restore when you disable Registry Filter and FBWF as well as disable System Restore when you re-enable Registry Fitler and FBWF.  Sysprep automatically enables System Restore so this is just a safeguard, but if you want to run FBWF and Registry filter on the system after the image is deployed you will have to disable System Restore due to conflicts between the services.

    To Disable Registry Filter and FBWF:

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RegFilter]
    "Start"=dword:00000004
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FBWF]
    "Start"=dword:00000004
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
    "Start"=dword:00000002
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr]
    "Start"=dword:00000000


    To Enable Registry Filter and FBWF

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RegFilter]
    "Start"=dword:00000001
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FBWF]
    "Start"=dword:00000000
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\srservice]
    "Start"=dword:00000004
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr]
    "Start"=dword:00000004


    Good Luck

    Terry Warwick [MSFT]

    Friday, August 14, 2009 8:42 PM
    Owner