XP Embedded

9-26-05

New notes from 2007: xpembedded2.htm

Embedded XP Tasks/Requirements

Feature

Status

Purchase an embedded development kit.

 

Create a Preinstallment Environment disk that allows partitioning disks, copying disks, copying flash, and contains target analyzer.

 

Develop a flash method of development.  This allows booting from CD-Rom and copying the OS image from the flash to the hard drive.

 

Develop a dual boot network method of development. This allows booting from one partition, and copying the OS image from the network to the other partition.

 

Create a list of devices on target PC by running target analyzer.

 

Make components for missing drivers.

 

Create a minimal target image by creating a target designer project with automatic logon and security. This does not allow network, usb, copying files, registry editing, device manager, control panel, etc.

 

Create a development/service target image by creating a target designer project.

 

Get CAN and DIO drivers working.

 

Minimize Windows user interface

  1. Boot directly to application
  2. Modify splash screen
  3. Disable startup/shutdown dialogs
  4. Make desktop wallpaper
  5. Remove desktop version

 

Make application components including all required files and registration to run.

 

Decrease boot time

  1. Turn off plug and play
  2. Remove unneeded devices/objects

 

Allow booting from flash

 

Design the application. Special consideration should be given to:

  1. Login
  2. File and network security
  3. Upgrading software
  4. Power up/down
  5. Prevent exit, change critical error handling

 

Manufacturing / Service

  1. Investigate cloning tool
  2. Investigate the device update agent

 

 

 


General Deployment Overview

I currently have a Realtek ICPMB-8660 from IEI that has been used for some development.  It contains an embedded compact flash socket.

 

The flash method of deployment that we use is:

  1. Create the embedded XP disk image on the development PC.
  2. Write a flash disk image from the development PC using a USB flash disk writer.
  3. Move the flash disk to the embedded PC and boot from a CD-Rom that will allow copying files from the flash drive to the hard drive (BartPE).
  4. Copy the flash to the disk drive.
  5. Boot on the hard drive, and allow the First Boot Agent to complete. After the First Boot Agent completes, the disk image will be complete.
  6. The new disk image can be copied back to the flash drive if needed to test booting from the flash drive.  This sequence means only a few flash writes are done per development cycle, and will prolong the life of the flash.

 

The network method of deployment is:

  1. Create a dual boot partition on the target PC.
  2. Copy a service version of the OS to the second partition.  This version should contain networking capability as well as explorer capability.  This will allow copying files.  This version of the OS must be modified to boot on drive D as indicated in the dual boot section.
  3. Boot to the service version to map a network drive, copy the test version of the OS to the first partition/disk. Make sure that there is a special boot.ini file that contains arcpaths to both OS’s.
  4. Boot to the test version of the OS to test it.

 

Most likely there may be two different types of XP disk image, one for use during development, and one for the end product. The one for development or service that would allow copying using explorer, and the end product may boot directly to the final application.

 

Download the XP Embedded Kit

A free trial version of the XP embedded development kit can be downloaded from Microsoft. This can be downloaded by going to http://msdn.microsoft.com/embedded/windowsxpembedded/default.aspx and going to the “How to Buy” page. The download file is XPEFFI.exe. The product code is JX4Q2-PHJ7Y-VMRG6-CR6FY-F973Y.

 

Run Target Analyzer

The first thing to do is to find what hardware is on the target embedded platform.

 

One option may be to use BartPE to make a bootable CD-Rom that includes the target hardware analyzer program, TAP. I found this method to be very easy.

  • Download and install BartPE
  • Copy the CDRom of the Windows installation CD-Rom for XP to C:\WindowsXPCD.
  • Run PE Builder.
  • For Source, specify C:\WindowsXPCD.
  • For Custom, specify C:/Program Files/Windows Embedded/utilities.
  • Enable the Create ISO Image.
  • Enable the Burn to CD.
  • If you want to repartition disks, BartPE with WinXP/Sp2 requires enabling the dcomlaunch plugin "RpcSS needs to launch DComLaunch Service first - SP2 only".
  • Press Build. This will produce the bootable CD-Rom.

 

The Microsoft way to make a bootable recovery disk is shown here.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxpesp2/html/RecovWPECreatingEmbeddedRecoveryCDByUsingWindowsPESDI.asp

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xpehelp/html/xetskhardwaredetectionwithtargetanalyzer.asp

 

Target analyzer can also be run by booting using the standard OS.  Windows PE will result in a smaller device set, although it cannot copy to USB flash.  It may be possible to manually remove devices if the standard OS was used.

 

Steps for running Tap and saving the target hardware configuration.

  1. We do not need to have multiple partitions, so no need to repartition the flash.  On the desktop workstation, use the USB PRO-9XP flash reader to format the compact flash as a FAT32 partition. This will allow using this flash to hold an image that can boot into Windows XP embedded.
  2. Insert the flash into the embedded PC.
  3. Change the setup of the embedded PC so that the first boot device is the CD-Rom. You may have to disable the 2nd and 3rd boot devices.
  4. Boot the embedded PC using Windows PE (or BartPE) on the CD-Rom.
  5. Run Tap to make a file named Devices.pmq.  Save the output file to the D: drive (which by default is the flash drive) if a hard drive is present. The embedded PC we will be using will support flash that acts as a hard drive. Load the flash into the embedded PC. The PC flash may have to be configured for master or slave.
  6. Turn off the embedded PC, and move the flash to the development PC reader to read and save the hardware configuration.

 

Running Target Designer

  1. Create a new workspace by using File New.
  2. Use File Import to import the devices.pmq file that was created by target analyzer. This will display information about missing drivers. Components will need to be created for any missing drivers. See “Make Components for missing drivers”.
  3. Run Check Dependencies. When a dependency error is listed in the task list, right click, and select Action. This will display a list of dependencies to add.  For MinLogon and the test environment, select the explorer shell.
  4. Run Build Target Image.

 

Make Components For Missing Drivers

Finding the Missing Devices

Importing the devices.pmq file may give, “Could not find a driver for …”.

For the RealTek I get this for:

  • Ethernet controller
  • SM Bus controller
  • Multimedia audio controller
  • Video controller
  • Ramdisk
  • Storage

 

Some examples are:

Could not find a driver for Multimedia Audio Controller (PCI\VEN_8086&DEV_24D5&SUBSYS_4740414C&REV_02).

Could not find a driver for Ramdisk [ QSoft ] (ramdriv).

Could not find a driver for Hardware Device: STORAGE\Volume (STORAGE\Volume).

 

For how to make components, see:

http://msdn.microsoft.com/embedded/community/community/tips/xp/thrdprty/default.aspx


http://msdn.microsoft.com/embedded/community/community/tips/xp/compo/default.aspx

 

Booting the created disk image os will also generate a setupapi.log:

 

            dev 8169, 24d3, 24d5, 2572 reports:

            #W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device.

 

Determining the device from the device ID.

For Realtek I got the following missing drivers

Device Name

Device ID

Full Name

How to find full name

Sys Mng Bus controller

PCI\VEN_8086&DEV_24D3&SUBSYS_24D28086&REV_02\3&13C0B0C5&0&FB

Intel(R) 82801EB SMBus Controller - 24D3

Found by searching internet for full device number

Audio controller

PCI\VEN_8086&DEV_24D5&SUBSYS_4740414C&REV_02\3&13C0B0C5&0&FD

AC’97 Audio Codec ALC650

From Realtek ICPMB-8660 specs

VGA controller

PCI\VEN_8086&DEV_2572&SUBSYS_25728086&REV_02\3&13C0B0C5&0&10

Intel 865GV + ICH5

From Realtek ICPMB-8660 specs

Ethernet controller

PCI\VEN_10EC&DEV_8169&SUBSYS_816910EC&REV_10\4&1F7DBC9F&0&50F0

Intel 82540 ethernet controller, realtek rtl8110S

From Realtek ICPMB-8660 specs

Ramdisk

 

 

 

Storage

 

 

 

 

VEN_8086 = Intel

VEN_10EC = Surecomm?

 

Finding an SLD file for a device

To find SLD files for drivers, search:

www.xpefiles.com

 

Searched the internet for rtl8110S and Intel 865 GV and downloaded drivers:

Device

File name

Download Location

internet controller

xp-rtlnic(621)(0516).zip

http://www.realtek.com.tw/downloads/downloads1-3.aspx?lineid=1&famid=4&series=2003072&Software=True

video

win2k_xp1413.zip or

intel_82xxx_graphic_controllers_182.zip

www.xpefiles.com

 

audio

Wdm_a374.exe

http://www.realtek.com.tw/downloads/dlac97-2.aspx?lineid=5&famid=12&series=8&Software=True

bus

Infinst_autol.exe or infinst_autol.zip or

Infupdate5_299.zip

http://developer.intel.com/design/motherbd/rc/rc_drive.htm

or http://www.xpefiles.com/viewforum.php?f=2

 

An example of making a “Realtek AC97 Audio driver” sld is at:

http://www.xpefiles.com/viewtopic.php?p=1932&sid=59a83daf43b325cdd460cc24f307548c

A Microsoft MSDN article “Creating a Component from an INF File” is at:

http://msdn2.microsoft.com/en-US/library/aa940231.aspx

Making a Disk Image

Use target designer for these steps. Some of these steps should only be used for a service deployment.

 

Minimal Deployment

1.      Component Designer steps

1.      Create a RealTek component for the missing drivers and add to the component database.

2.      Create a custom shell component and add to the component database.

2.      Target Designer steps

1.      Do the steps in Running Target Designer at least to import the devices.pmq.

2.      Add standard windows components: NT Loader, FAT, English Language Support components. Optionally add NTFS, NTFS Format, & FAT Format components.

3.      Add Windows Logon or minlogon. Use minlogon instead of winlogon if security is not needed. Set Winlogon properties to remove welcome screen.

4.      Add the application Shell and application components

5.      Disable keyboard shortcuts like Ctl-Alt-Del?

6.      Add USB UI? This is only useful if some app can copy to/from.

7.      Add OpenGL.

8.      Select the video driver (Intel 82865) Settings, and change the screen resolution. Add PNP (user-mode) to allow setting a screen resolution.

3.      Adding User Account Security

1.      Add “User Account”. Select it for details, and press the Advanced button. cmiUserGroup: 1=administrator, 2=power user, 3=user, 4=guest. Do this once for each pre-defined user.

2.      Add Automatic Logon and select settings. Set user to startup user.

4.      Set drive location and disable startup screen

1.      Click on the top level item in target designer to display the details. Click the advanced button, and set the drive and ArcPath settings if booting from drive D. Disable Windows startup screen by adding /NOGUIBOOT to arcpath of boot.ini. Modify the boot.ini for dual boot systems.

 

Full Deployment

  1. Use EWF to enhance speed and life of the flash. Flash can only be written about 1 million times, but usually has spare sectors to allow remapping. Use EWF Ram Reg mode to store ewf data in the registry on the flash disk and only require one partition. No need for SC and DUA. We may move the event log and do something to the pagefile. Add the Enhanced Write Filter (under Software/System/System Services/Base) and enable lazy write?
  2. Add the Runtime Quick Start Helper Macro from under Software/Test and Development.  This will add NTLDR, explorer, file systems, and other startup files. Disable NTLDR so that EWF NTLDR will be used. Only do this if using EWF.
  3. Add NTFS security, Security Shell Extension for changing NTFS security, CACLS.EXE or XCALCS.EXE for setting NTFS rights.
  4. Add “CMD – Windows Command Processor”
  5. Add Microsoft Management Console
  6. Add networking
    1. Add the Map Network Drives/Network Places Wizard
    2. Add the TCP/IP Networking with File Sharing and Client for MS Networking
    3. Add the Network Command Shell
    4. Add the Network Command Shell Interface Context
  7. Add “Administration Support Tools”
  8. Add “Event Log”
  9. Add Administrator Account, User Account if not added by networking?
  10. Add TCP/IP Utilities?
  11. Add System Control Panel
  12. Add USB User Interface
  13. Add “Add Hardware Control Panel” to allow adding devices (and USB?). Add Device Manager.
  14. Add “Display Control Panel” component.
  15. Add “Add/Remove Programs” to allow removing bad drivers?
  16. Add Windows Accessories for all start menu accessories like notepad, etc.
  17. Add Registry Editor for regedit utility.
  18. Modify the User Interface Core options.
  19. Add “OpenGL Support” and Direct3D or “DirectX 8”.

 

See “Security Considerations for Windows XP Embedded Developers” to decide between minlogon, etc.

First Boot Agent

The first boot agent will run once during the first install of the os on the target machine.  I have read that it is best to do this on the hard drive first to prolong the life of the flash.  This is because FBA does a lot of registry updating.

 

Have to use ETPREP?

\Windows\  Setup  Api.log?

Realtek PCPhoenix Bios

Many times the Realtek PC will not boot from CD-Rom unless all other boot devices are disabled. The other way is to cause a delay by entering setup (press Del during boot), and let the CD-Rom spin up, then quit setup and allow the boot to continue.

Logging in to the network

If the network drivers are loaded, use the following to map a network domain drive.

Map network drive, folder = “\\machine\dir”. Change user to group \username or username@group. After logging in to the machine, then it is possible to map a drive to a PC in the network domain.

Testing a new OS/Boot image

It would be nice to have a program that would copy only changed files to flash.  It would prolong flash lifetime and increase the speed to copy.  Alternately we may be able to use the network to copy the boot image.

 

To copy from the flash to the target machine:

To see which drive is the flash, and which is the hard drive, simply do a dir command and look at the disk size. The following shows how to delete the old os on the C drive, and copy the flash to the C drive.

1.      rd \ /s /q

2.      xcopy d: c: /e /h /v

 

Creating and using Application Components

Start the Component Designer. In Component Designer, use File New to create a new sld project.

 

Create an Application Component

Create a AppRepository directory and copy the application files into this directory.  Create an App repository that points to this directory.

 

Create an application component. Right click on Files and add the application files.

 

For Application Components

For the Destination (destination path), use %16422%\company\app\bin. Right click on Group Memberships and add to the Software/Applications/OEM group.

 

Updating a Component into the Database

Select Tools and run Component Database Manager. Push the import button to import the SLD file. Make sure to start the Component Database Manager while no other tools are running.  If an error happens during reimporting, then delete the repository in the Windows Embedded Data directory.

 

Using Components in Target Designer

Then use Target Designer to add the application component.

 

To find dependencies

Many modules need to be "registered" on a computer before they will work.  This includes most ActiveX controls, OCXs, COM components, ATL components, Visual Basic components, and many others.  These types of modules are usually registered with REGSVR32.EXE or something similar.  For the most part, REGSVR32.EXE loads your DLL, calls GetProcAddress for the DLL's DllRegisterServer function, then calls that function.  A common failure is when your DLL relies on another DLL that is missing or not registered.  If you just open your DLL in Dependency Walker (depends.exe), you may or may not see a problem, depending on the type of registration failure.

The best way to debug a module that fails to register is by opening REGSVR32.EXE in Dependency Walker rather than your DLL.  Then choose to start profiling (F7).  In the profiling dialog, enter the full path to your DLL in the "Program arguments" field.  For "Starting directory", you may wish to enter the directory that the DLL resides in.  Check the options you wish to use and press Ok.  This will run REGSVR32.EXE and attempt to register your DLL.  By actually running REGSVR32.EXE, you can see more types of runtime errors.

 

If REGSVR32 returns an error of 80070005, then the access rights to the registry are most likely not set correctly. The administrator account may need to be used in some way to set up the registry.

Make a Dual Boot System

If the target system is dual bootable, it is possible to boot on one OS on disk, and upgrade the other.  It is also possible to load a service OS that can be used to diagnose the other OS.

 

·        BartPE with WinXP/Sp2 requires enabling the dcomlaunch plugin "RpcSS needs to launch DComLaunch Service first - SP2 only".

·        Use DiskPart on BartPE to delete an existing partition, and repartition the disk with a 20GB partition and a second partition with all remaining space.  The extended partition will contain one logical partition.

  1. list disk
  2. select disk 0
  3. list partition (If there is no partition, then skip deleting the partition.)
  4. select partition 1
  5. delete partition
  6. create partition primary size=20000
  7. active
  8. create partition extended
  9. list partition (The extended partition should still be selected with an asterisk. If it isn’t, then select it using select partition 2)
  10. create partition logical

·        Reboot, then format the disks as FAT32 or NTFS

  1. Format c: /fs:FAT32
  2. Format d: /fs:FAT32

·        Edit the boot.ini file

[boot loader]

timeout=10

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect

 

Target Designer

FBA will crash during the install on drive D:, unless the following is used.

1.. In Target Designer, choose your configuration.
  2.. Choose Advanced.
  3.. In the Advanced Configuration Settings dialog box, change the values
for the following settings to reflect the drive where your run-time image
will be installed:
    a.. cmiTargetWinDrive
    b.. cmiTargetProgramFiles
    c.. cmiTargetDocsAndSettings
  4.. Leave the cmiTargetBootDrive value set to drive C.
  For example, if you want your run-time image installed on drive D but you
want to boot your run-time image on drive C, you would make the following
changes:

    a.. Set cmiTargetBootDrive to drive C
    b.. Set cmiTargetWinDrive to D:\Windows
    c.. Set cmiTargetProgramFiles to D:\ProgramFiles
    d.. Set cmiTargetDocsAndSettings to D:\DocumentsAndSettings

 

Customizing Logon

Some tasks done here.

1.      Remove Start Bar, start without shell application. (Shell customization)  Follow the shell customization guidelines for XPE.

2.      Replace the boot splash screen.

3.      Disable Windows startup/shutdown screens (Windows is starting up/Windows is shutting down).

 

Replacing the Boot Splash Screen

Use the /bootlogo switch to have Windows XP or Windows Server 2003 display an installable splash screen instead of the standard splash screen. First, create a 16-color (any 16 colors) 640x480 bitmap and save it in the Windows directory with the name Boot.bmp. Then add "/bootlogo /noguiboot" to the boot.ini selection.

 

Limiting Startup and Shutdown Messages

I found that one way to completely eliminate Windows messages is to use the AutoLogon component, and to disable the friendly logon switch in the “Windows Logon” component.

In addition, the following may have to be done: Add the following registry key to Target Designer to limit startup and shutdown messages. Use View/Resources and view Extra Registry Data to display registry entries.

[HKLM\SOFTWARE\M­icrosoft\Windows\CurrentVersio­n\policies\system], "DisableStatusMessages". Set this dword value to "1" and reboot.

 

Also add:

            [HKEY_USERS\.DEFAULT\Control Panel\Colors\], “Background”. Set this to “0 0 0” or something else.

 

For more info, see http://www.mp3car.com/vbulletin/archive/index.php/t-51635.html.

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

 

Changing Desktop Wallpaper

This isn’t needed if the background color is set as above. In Target Designer, use View/Resources to add extra registry data.

 

If you want to put the registry data into a component, open your component in Component Designer, add a Component Build Order Dependency on "Windows API - User". This will ensure that your component is built after the default wallpaper registry entries are set.

http://www.mcse.ms/archive230-2005-1-1355717.html

 

HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper = path to bmp

HKEY_USERS\.DEFAULT\Control Panel\Desktop\TileWallpaper = 2 (2=stretch)

 

 

Hiding Build Version

I found that if a white background (wallpaper) is used, that the build version isn’t visible.

If it really must not be displayed, search for “hide build number xp”.

 

Run TWEAKUI.EXE > General > Show Windows version on desktop.
You can download this tool with the Windows XP Powertoys at
http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp.
If you run a Preview edition you may not be able to remove this
information.

 

Debugging Registry Keys on Other Partition

To debug registry keys on the other partition, use:

Run REGEDT32.  Select HKEY_LOCAL_MACHINE.  Choose
File\LoadHive ... guide it to any of the registry files on the old
system (they are: all of the NTUSER.DATs and, in system32\config, DEFAULT,
SECURITY, SYSTEM, SOFTWARE, and SAM)

 

Preventing Password Expiration

There is a file on xpefiles.com that can be loaded as a component.  Then simply include the component into target designer.

 

Debugging Boot

Available debug logs are:

Setupapi.log

Ntbtlog.txt

Fbalog.txt

Event log

Userenv.log

 

I had multiple major time delays during the boot process with a minimal build.  I did not have much success with logs to find the problems.

·        The missing PNP component caused a 60 second delay.

·        The missing Event Log component caused a 30 second delay. With Service Pack 2, this now shows up when the “Administration Support Tools” component is missing.

·        There was a hang when using a custom shell in wlnotify.dll.  The screen displayed “Loading your personal settings”. This was resolved by triggering the “msgina: ShellReadyEvent” event.

 

Show Verbose Security Status Messages

This can show different information while booting, but may still not narrow down the problem.

Go to the key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System

Create a new DWORD value called "verbosestatus" and set it to "1".

Make sure that if there is a value with the name "DisableStatusMessages", that it is not present or contains 0.

 

FBA Log

The FBA log in the windows/fba directory will display some boot errors.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xpehelp/html/xetbscommonfbalogfileerrors.asp

 

Originally the boot logo screen was displayed for more than 60 seconds. An error “Settings not found!” was in the fba log file.  Once PNP (user-mode) was installed, then the error was removed, and the logo screen was displayed for just a few seconds.

 

SetupAPI.log and XPETools

In setupapi.log, there is still errors 0x80040154 for activeds.dll (in Active Directory Service) and userenv.dll (in Primitive:userenv).  This means that there are missing dependencies, but they have not been found yet, and may not be needed.  To find which component contains a file, create a filter under Tools/Filter Manager.  You may have to lower the visibility in Tools/Options/Advanced to find the component.  You can also download xpetools.  It contains a dependency manager tool that can loaded into the database, and then can be inserted into target designer.  It will filter for files listed with certain dependencies.  This will not find components that were designed without proper dependencies.

 

Event Log

The event log viewer can be used to open an event log on another partition. Use Action/Open Log File to do so.  The event files have an extension of .evt. The registry keys for the event log are under HKEY_LOCAL_MACHINE\SYSTEM\Cur­rentControlSet\Services\EventL­og.

 

Boot Log

To debug the boot, press F8 while the ROM BIOS is starting.  Then select the item to enable boot logging. This will create a file called %SystemRoot%\Ntbtlog.txt.

 

By default, if your XPe device has a NIC installed and networking has been added to the target image, DHCP will be enabled.  If your device is not connected to a DHCP server, then your target device may be stalling at boot due to a DHCP timeout.  Either connect your target to a DHCP server or assign your target a static IP address to resolve this problem.

 

You may also use /SOS switch in boot.ini to see what drivers get loaded
and what slows down the boot. Also, sometimes /BOOTLOG switch is also
helpful. Add “/noguiboot /sos /bootlog” to boot.ini and remove /bootlogo.

 

You can modify the boot.ini on your target to send out debug messages via serial -- add the following flags to your XPe boot option:
/debugport=COM1 /baudrate=115200

 

BootVis

Download bootvis from any location, and run on target machine by specifying “bootvis -on boot”. This can be done by booting the system into cmd, and then running bootvis. To view the created file on some system, use bootvis filename. This requires that DbgHelp.dll is in Windows\System32.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon = path to cmd.exe

 

BootVis is not supported by Microsoft anymore.  I imagine this is because too many unknowledgeable customers tried to use it on their home systems, and Microsoft didn’t want to support them.

http://www.microsoft.com/whdc/system/sysperf/fastboot/default.mspx

 

Currently on the minimal system, I get the error:

Failed to create a link to bootvis.exe in the windows startup group.

I tried adding regedit, and this did not solve the problem.

 

"Safe Mode" crashes. It is not supported in the current version of XPE.  It is supposed to be in later.

Debugging with SetupAPI.log

Change the log level in:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel

This can be set to:

0x00006060                timestamped messages

0x0000FFFF               very verbose

 

This key can be set in the target designer under View/Resources.

 

For a doc that describes this key:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/troubleshoot_9cef0df9-240c-4d89-b696-8b404098ba83.xml.asp

 

A file called setupapi.doc that describes the log can be downloaded from Microsoft.

 

Slimming Down Windows XP

http://www.neowin.net/forum/lofiversion/index.php/t316422.html

 

Debugging with Userenv.log

From “How to enable user environment debug logging in retail builds of Windows”.

 

Use Registry Editor to add or to modify the following registry entry:

Subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Entry: UserEnvDebugLevel
Type: REG_DWORD
Value data: 10002 (Hexadecimal)

 

Set UserEnvDebugLevel to 0x00030002 for most verbose logging.

Note that the file will not be written unless a directory is created.  The directory is

“%Systemroot%\Debug\UserMode\”

Booting to CompactFlash

There are two disk formats that we would probably use.

  • Using FAT32. Bootprep must be run on a flash configured as FAT32. Bootprep only works running from DOS. Bootprep is on the BartPE disk, but it doesn’t seem to work.Run bootprep as: E:\>X:Bootprep where X is the bootable drive, and E: is the flash drive.  You can find the flash drive by the bytes free listed in the Dir command.
  • Using NTFS - This hp utility allows formatting a USB flash as NTFS. http://h18007.www1.hp.com/support/files/hpcpqdt/us/download/20306.html. The filename is SP27213.exe.  This appears to successfully format the flash, but there is still a “disk read error”, Press Ctrl-Alt-Del to continue.  So perhaps it is not marked as the active partition or something like that.

 

The following works for the Realtek board. Press Del to go into the Phoenix Bios setup.  Go into the Standard CMOS Setup. Go into the “IDE Channel 1 Master”, and press Enter on the “IDE HDD Auto-Detection” area.  This should run auto-detection, and will update the “IDE Channel 1 Master” with the flash name such as “SanDisk SDCFB-1024”. Set “IDE Channel 1 Master” to Auto, and Access Mode to Auto.  Also check the disk boot priority on the advanced page.

Using Compact Flash (CF) with the Enhanced Write Filter (EWF)

New Application Design

It is possible to use the OS security and support user logon by using the LogonUser function and ImpersonateLoggedOnUser functions.

When a crash occurs, the application could automatically restart like Explorer.

 

It is possible and usually desirable to write the application without going through XP logon screens.

 

Low Security

Some applications may not require a user to log on.  But network access may be restricted.

 

High Security

High security may require using NTFS and may require logging into a domain.

 

Quick Boot

Use two power buttons using sleep mode.  See “Finding and Eradicating Big Footprint” at the Microsoft web site.  See Boot Speed.

 

Use ExitWindowsEx to exit Windows.

 

It seems like xcacls can be used to set NTFS directory rights, but it is limited in what privileges it supports.

 

To only allow admin or users:

"%ProgramFiles%\resource kit\xcacls" data /P Administrators:F;F Users:F;F /Y

"%ProgramFiles%\resource kit\xcacls" logs /P Administrators:F;F Users:WE;WE /Y

 

Or to only change users:

"%ProgramFiles%\resource kit\xcacls" data /X /P Users:F;F /Y

"%ProgramFiles%\resource kit\xcacls" logs /X /P Users:WE;WE /Y

 

Hosted by www.Geocities.ws

1