in

Brad Combs - News and information on the obvious, the not so obvious and the downright confusing.

Windows Embedded Standard - Tips, Tricks, How-To's and News.

April 2010 - Posts

  • HowTo: WES7 - Disable First Run in Internet Explorer and Windows Media Player


    Some device designs require that users are not prompted with the "First Run / OOBE" dialogs in Internet Explorer and Windows Media Player. These are the dialogs that let you set defaults like search provider (IE) or supported media types (Media Player). These can be disabled through the registry using the guidance here:

    Windows Media Player - GroupPrivacyAcceptance

    Internet Explorer - First Run 

    If you want to do this directly in ICE, you can use reg.exe and add Synchronous Commands to do the work:

    1)        Add two Synchronous Commands to your Answer File
         a.      On the Insert menu, point to Synchronous Command. Choose oobeSystem as the configuration pass.
        
    b.      The Create Synchronous Command dialog box opens.
        
    c.      In the Enter command line text box, enter :

         REG ADD "HKLM\Software\Policies\Microsoft\Internet Explorer\Main" /v DisableFirstRunCustomize /t REG_DWORD /d 1 /f

         d.      Choose OK.
        
    e.      The command is added to the answer file in the selected configuration pass.
        
    f.       On the Insert menu, point to Synchronous Command. Choose oobeSystem as the configuration pass.
        
    g.      The Create Synchronous Command dialog box opens.
        
    h.      In the Enter command line text box, enter :

         REG ADD "HKLM\Software\Policies\Microsoft\WindowsMediaPlayer" /v GroupPrivacyAcceptance /t REG_DWORD /d 1 /f
     


    In the Settings pane in ICE notice the two new FirstLogonCommand entries:



     

    Internet Explorer and Windows Media Player will both open, for all users, with the First Run disabled.

    Note: These settings are set in HKLM, so they will apply to all users.

  • HowTo: Determine the UFD where WinPE was booted

    Applies to: WinPE 2.0+

    Requirements: Ramdisk boot (not "Flat Boot")

     

    This is a pretty common question because you need to locate the WIM image that you are going to apply to the device and it is stored on the UFD with a randomly assigned drive letter. When booting WinPE from a Ramdisk (standard method with PE 2.0 +), you are booting into a Ram drive with an assigned drive letter of X: Meanwhile, the underlying physical UFD is given a different drive letter (D:, E:, etc…). The drive letter can vary depending on the number of disks attached to the system. If you need to determine what the UFD drive letter is so you can access the WIM (or other files) look up the PEBootRamdiskSourceDrive value in the registry of WinPE. 

    reg query "HKLM\SYSTEM\CurrentControlSet\Control" /v PEBootRamdiskSourceDrive 

    So, the next logical question is “How can I script this so that it runs at startup?”. Copy the line below in a batch file and run it in startnet.cmd (or add the line directly to startnet.cmd): 

    FOR /f "skip=2 tokens=3 delims= " %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control" /v PEBootRamdiskSourceDrive') DO SET SOURCEDRIVE=%%a
     

    This will set a value of SOURCEDRIVE with the drive letter of the UFD where WinPE was loaded from. It sets it with the :\ as well (D:\, E:\, etc…). So in your scripts use the drive letter accordingly. Note that if you remove wpeinit.exe from startnet.cmd the PEBootRamdiskSourceDrive value will not be populated. If you want to remove wpeinit.exe, then add wpeutil updatebootinfo to startnet.cmd. Wpeutil will populate the values.

     

© 2007 www.XPeFiles.com
Powered by Community Server (Commercial Edition), by Telligent Systems