Windows Embedded Blog

POSReady 2009 and BGInfo – missing Network information

with one comment

imageIf you like to use BGInfo on POSReady you will notice that the Gateway information and other network information is missing from the output.
The lack of this information is caused by a missing DLL file which is not included in POSReady 2009.
To enable this output copy over the "inetmib1.dll" file from an English XP Pro SP3 installation to the POSReady system.
The file is located in the Windowssystem32 directory. If you refresh the information now using BGInfo all information is displayed.

Written by Wolfgang Unger

November 27, 2009 at 13:20

7 Reasons to choose Windows Embedded Standard 2011

leave a comment »

I have done a listing of 7 reasons why to use Windows Embedded Standard 2011 which is the upcoming Embedded version of Windows 7.

You can find the post here.

Written by Wolfgang Unger

November 5, 2009 at 10:16

Posted in Windows 7 Embedded

Driver Extractor for XP Embedded and Windows Embedded Standard

leave a comment »

Download is available on the Elbacom Techblog (v0.9)

imageDriver Extractor is a tool which makes creating SLD components for drivers very easy.
All you need to do is to run the tool on the target machine with XP, Vista or Windows 7 and all device drivers installed.
Then you just need to select the devices for which the drivers should be exported into an SLD file and click export.
Driver Extractor will then copy all the needed files and creates a component for XPe/WES with Repository for you.
After importing the component to the database you can easily create your image.

Requirements

  • .NET Framework 3.5 SP1
  • Windows Operating system with all needed device drivers installed
  • WMI Support (if running on an embedded OS)
  • Windows must be installed on C:Windows in the current version

How To Use

  1. Run DriverExtractor.exe on the target device. The Windows version should be XP as the exported drivers are taken from the current installation. If you use Vista it will take Vista driver which might not work under XP!
  2. Check the devices for which you want to export the drivers.
    image
  3. Click Actions / Export Selected.
    image
  4. Choose an output directory. The tool will create a separate folder for each component named by the devices name.
    image
  5. Import the component (located in the output directoryDevicenamesld directory) into the Database by using the Component Database Manager
    image imageimage 
  6. Add the component to your configuration

 

Description

Menus
File / End Ends the program
Actions / Export Selected Exports the drivers for the selected devices
Actions / Select All Selects all devices
Actions / Deselect All Deselects all devices
Actions / Refresh Refreshes the device list
View / Files of selected device
Contextmenu / Show Driver Files
Shows the needed driver files for the current selected device
View / Properties
Contextmenu / Properties
Opens the Windows properties for the current selected device
? / About Displays information about the tool
   
Toolbar

image 

image Refreshes the device list

image  Shows the needed driver files for the current selected device

image Exports the drivers for the selected devices

image Opens the Windows properties for the current selected device

Download is available on the Elbacom Techblog (v0.9)

Written by Wolfgang Unger

October 12, 2009 at 11:53

VMLauncher and Virtual PC RTM (Advanced Integration of XP Mode)

leave a comment »

Today Windows Virtual PC RTM has been released to MSDN subscribers. I just upgraded my RC version to the RTM and tested VMLauncher.
The Result: VMLauncher will also work with the final version of Windows Virtual PC.

You can download the free tool here and find more information about it here.

Written by Wolfgang Unger

October 8, 2009 at 16:02

Posted in Windows 7

BootVHD

leave a comment »

Download (v.0.9)

I wrote a command-line tool which allows you to easily add, remove or update your bootmanager configuration to use VHD files.
The tool will only work if you have a system with only VHD boot (no Win7 system installed directly!)

image

How to use it

The tool uses the following command line arguments:

BootVHD.exe –Install –VHD Win7Emb.vhd

No Argument  Displays all installed VHDs
-Install     Installs the VHD specified with the -VHD switch.")
-Name        Sets the name for the bootentry.")
             Works only together with the -Install switch.")
-Delete      Deletes the VHD specified with the -VHD switch.")
-VHD         Filename of the VHD file.")
             Can be located in the working directory of this program.")
             Can be located in the root directory of the boot partition."
-Default     Sets the specified VHD as the default bootentry.")
             VHD can be specified via the -VHD switch or ")
             use this switch together with the -Install switch.")
-Replace     Replaces the default bootentry with the specified VHD.")
             VHD can be specified via the -VHD switch or ")
             use this switch together with the -Install switch.")

 

Easy Deployment

The tool can be used as well for the easy deployment or update of new image versions in Windows Embedded Standard 2011 (Windows 7 Embedded).
For example if you have installed the Embedded OS in a VHD file (as shown in my previous post) you can easily upgrade your application or the whole image and then put the modified VHD file to an USB drive. The installation is then really easy. All you need to do is run a batchfile.

The BootVHD tool will copy the new VHD over to the bootpartition and can update the bootmanager to boot the new image by default.

Batchsample

BootVHD.exe –Install –VHD NewVersion.vhd –Name “Version 2.0” -default

With this call the NewVersion.vhd gets copied to the boot partition and an bootmanager entry with the name “Version 2.0” is being created.
The new entry is also the default boot entry.

This way you can do an easy deployment of a new version and in case something is wrong with it you can go back to the previous version by just selecting it in the bootmenu.

Download (v.0.9)

Written by Wolfgang Unger

October 7, 2009 at 17:01

Posted in Windows 7

Enhanced Write Filter – Installation Batch File

with 3 comments

I have created a small batch file which will help you to integrate the Enhanced Write Filter into an existing image.
This batchfile automates the steps which I posted a while ago and makes the integration very easy.

Requirements

The batchfile needs some files to be present which I cannot provide here for download but you can easily extract them by using the Target Designer.

  1. Create a folder named ewfinstall
  2. Download the Windows Server 2003 Resource Kit
  3. Copy the Regini.exe from the Resource Kit to the ewfinstall folder
  4. Start Target Designer
  5. Add Enhanced Write Filter component
  6. Add EWF Manager Console application component
  7. Add EWF NTLDR component
  8. Add Misc. Command Line Tools component
  9. Build the image to any folder
  10. copy the following files to the ewfinstall folderimage
    1. Windowsinfewf.ini
    2. Windowssystem32ewfdll.dll
    3. Windowssystem32ewfinit.dll
    4. Windowssystem32ewfmgr.exe
    5. Windowssystem32driversewf.sys
    6. ntldr
    7. Windowssystem32reg.exe
  11. Create a new textfile in notepad, paste the following and save it to the ewfinstall folder with the name EWF_Reg_Config.txt

    registrymachine
         SYSTEM
             CurrentControlSet
                 Enum
                     Root [1 5 7 14 17]

  12. Create a file named ewf.reg in the ewfinstall folder and paste the following content

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINESYSTEM]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001Control]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass{71A27CDD-812A-11D0-BEC7-08002BE2092F}]
    "UpperFilters"=hex(7):45,00,57,00,46,00,00,00,00,00

    [HKEY_LOCAL_MACHINESYSTEMControlSet001Services]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWF]
    "ErrorControl"=dword:00000001
    "Group"="System Bus Extender"
    "Start"=dword:00000000
    "Type"=dword:00000001

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFFBA]
    "OVSize"=dword:00000000
    "OVLevel"=dword:00000001
    "PVConfigs"=dword:00000001
    "EwfEnable"=hex(7):31,00,00,00,00,00
    "EnableLazyWrite"=hex(7):30,00,00,00,00,00
    "PVDisk"=hex(7):30,00,00,00,00,00
    "PVPart"=hex(7):31,00,00,00,00,00
    "PVOptimize"=hex(7):30,00,00,00,00,00
    "PVType"=hex(7):31,00,00,00,00,00

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParameters]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParametersProtected]

    [HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParametersProtectedVolume0]
    "Type"=dword:00000001
    "Enabled"=dword:00000000

  13. Create a ewfinstall.bat file in the ewfinstall folder and paste the following content

@echo off

echo ————————-
echo EWF Installer
echo created by Wolfgang Unger
echo ————————-

if "%1"=="" GOTO ARG_ERROR
if "%2"=="" GOTO ARG_ERROR

echo Copying EWF files…
copy ewfdll.dll %1Windowssystem32
copy ewfinit.dll %1Windowssystem32
copy ewfmgr.exe %1Windowssystem32
copy ewf.sys %1Windowssystem32drivers
copy ewf.inf %1Windowsinf
copy ntldr "%1"

echo Changing permissions in registry…
regini.exe EWF_Reg_Config.txt

echo Importing registry data…
reg import ewf.reg
reg add  "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEWFParametersProtectedVolume0" /v ArcName /t REG_SZ /d %2 /f

echo Done.
GOTO END

:ARG_ERROR
echo usage ewfinstall.bat Drive ARC-Path
echo       ewfinstall.bat C: multi(0)disk(0)rdisk(0)partition(1)

:END

How to use the script

Run ewfinstall.bat with two arguments

The first argument specifies the drive letter where Windows is installed, e.g. C:

The second argument specifies the ARC Path where Windows is installed, e.g. multi(0)disk(0)rdisk(0)partition(1)
You can find the ARC Path in the boot.ini if you are unsure what to use.

After the script has finished restart the PC.

You can enable the EWF by running ewfmgr c: /enable

Written by Wolfgang Unger

September 15, 2009 at 16:43

Installing Windows Embedded Standard (Windows 7 Embedded) in a VHD file

with 2 comments

One of the new capabilities of Windows 7 Embedded is to boot from a VHD file. This is a great possibility which can help a lot in case of deploying updates, running different version, or deploying the system in general as it’s again a simple file copy&pasty procedure on NTFS.

You can even install Windows 7 Embedded directly into a VHD so you don’t need to transfer it to a VHD manually – also you don’t need BCDEDIT as the setup will take care of this.

Before you start you need an formatted NTFS volume where the VHD will be located.

Installation

  • Boot the target device from the Runtime DVD
  • When the setup screen appears pres Shift+F10 – this will open a command prompt
  • Run diskpart.exe
  • Run the following commands to create a 5GB VHD

create vdisk file=c:Win7Emb.vhd maximum=5120
select vdisk file=c:Win7Emb.vhd
attach vdisk
exit

  • close the command prompt and run through your Windows 7 Embedded installation
  • select the VHD harddisk at the target drive selection

 

Cloning

The cloning process with VHDs it quite easy:

  • format a new hdd with NTFS
  • copy the whole content of the target drive where the VHD is located to the new harddisk
    (make sure that you see all the system files – the bootmanager is hidden by default!)

    Example where C is the master drive and D is the new target drive:

robocopy C: D: /E

 

Imageupdates

If you have an update for your image you can easily copy the new VHD to the target harddisk, e.g.:

C:
  — Win7Emb.vhd   [Original Windows 7 Embedded]
  — Win7Emb_v2.vhd  [Updated Windows 7 Embedded Image]

Now you just need to install a new bootentry and set it as default.

bcdedit /copy {default} /d "Updated Windows 7 Embedded Image"
bcdedit /set {GUID} device vhd=[C:]Win7Emb_v2.vhd
bcdedit /set {GUID} osdevice vhd=[C:]Win7Emb_v2.vhd
bcdedit /default {GUID}

If something is wrong with the new image you can easily revert back.

Written by Wolfgang Unger

September 8, 2009 at 14:45

Posted in Windows 7 Embedded

Advanced Integration of Virtual PC 7 / XP Mode

with 8 comments

Free Download: VMlauncher.zip (Version 0.9)

VMLauncher allows you to open any file or folder from your local host system in a specified Virtual Machine.
This improves the integration of Windows Virtual PC.
There is no need anymore to open the Virtual Machine in Desktop Mode to install a new application!
You can open any program, file or folder directly from your Windows 7 Desktop.
Just right click on the application, file or folder and select the “Open in Virtual Machine” and it will open in the selected Virtual Machine but will run directly on your Windows 7 Desktop.
 image

Example: You want to install a new program in XP Mode (Virtual Machine).
Just right click onto the Setup file and select "Open in XP Mode".
The setup will start directly in the XP Mode Virtual Machine but will run on the Windows 7 Desktop.

 

For example you can create your own Sandbox OS.
Just enable Undo Disk on your XP Mode PC and you can install any software right from the Windows 7 Context Menu.
If you get tired of the software just clear the undo disk.

image

Requirements – Host System

  • Windows 7
  • Windows Virtual PC 7 RC
  • .NET Framework 3.5 SP1

Requirements – Guest System

  • Integration Features installed
  • Integration Features activated
  • Visual Basic 6.0 Runtime
  • MSXML 3.0

Installation – Host System

  • Extract the files to any folder with write permission on your pc
  • Run the VMLauncher.exe

Installation – Guest System

  • Copy the VMLauncher.exe from the Client folder to any folder in the Virtual Machine
  • Run the VMLauncher.exe in the Virtual Machine
  • Answer the appearing messagebox with yes to install the software

How to use

  • Open the VMLauncher.exe on the host system
  • Check the Virtual Machines in the list on the left side which should appear in the context menu
  • Click Apply to update the context menu

Now you can right click on any file in Windows Explorer and select "Open in xxxxxx" and the file will open in the selected Virtual Machine.

Function description

Refresh
This will refresh the list of available Virtual Machines. All VMs with VMLauncher.exe from the Client folder installed will appear in this list.

Create Launchfile

This allows you to create a custom launch file. With the custom launch file you can start any application in a specific Virtual Machine.
To create a launch file
– select the Virtual Machine in which the program should from the list above
– enter the full application path into the input dialog (e.g. C:Program FilesInternet Exploreriexplore.exe)
– save the launch file where you can easily access it (e.g. your Desktop or Startmenu)
To run the program in the VM just double click the Launchfile.

Keep Launchfiles
This will keep all the launchfiles created through “Open in xxxxx” in the application folder.
Normally a launchfile gets deleted after it has been executed.
This function is indended for debug reasons only.
Custom created launchfiles (created with the Create Launchfile button) will never be deleted!

Show VMs in folder context menus
This will add the "Open in xxxxxx" context menu entries for the selected VMs also in the context menus of folders.
With this function enabled you can right click any folder and select "Open in xxxx" to open it with the VM’s Windows Explorer.

Always Mount Network Drive
If this option is enabled VMLauncher will always connect a network drive to the host system and open the file through the mounted path. You should use this function if some setup applications do not work (see Mount Network Drive for these filetypes)

Mount Network Drive for these filetypes
VMLauncher will mount a network drive to the host if one of the specified filetypes should be opened in a VM.
For example .msi files will create an error if they are launched through a RDP share (e.g. \tsclientCsetup.msi).
If you add .msi to the list of filetypes the msi file will be launched from the mounted drive and run normally without any error (e.g. R:setup.msi)

Discard & Close
Closes the configuration window without saving the changes

Apply
This will apply the changes and leave the window open
An UAC window will appear – you need to allow it to make the changes

Save & Close
This will apply the changes and close the configuration window
An UAC window will appear – you need to allow it to make the changes

Uninstall – Host System

  • Run VMLauncher.exe
  • Uncheck all VMs from the list and click Save & Close
  • Delete the program

Uninstall – Guest System

  • Run the VMLauncher.exe with the argument UNINSTALL

VMLauncher.exe UNINSTALL

  • Click Yes
  • Delete VMLauncher.exe

Free Download: VMlauncher.zip (Version 0.9)

Written by Wolfgang Unger

August 23, 2009 at 17:02

Posted in Windows 7

Creating an encrypted file container using VHD files and BitLocker To Go

with 3 comments

With Windows 7 you can create encrypted container files without using any third-party tools.

For example you can create a file named importantdata.vhd which contains sensitive data which can only be opened with the correct password or with your smartcard.

These are the steps to create an encrypted container file:

  • Open Disk Management MMC (Start – diskmgmt.msc – Return)
  • Click Action – Create VHD
    image
  • Enter a filename for the VHD file and specify a size
    image
  • Right click on the newly created Disk in the list below and click “Initialize Disk”
    image
  • Click OK
    image
  • Right click on the unallocated space and select “New Simple Volume…”
    image
  • Follow and finish the wizard to format the volume

 

  • Open BitLocker Drive Encyption Control Panel (Start – Bitlocker – Return)
    image
  • Click “Turn On BitLocker” right next to the newly created volume on the VHD file in the BitLocker To Go section
    image
  • Select “Use a password to unlock the drive” and specifiy a password. Alternatively you can also use a smartcard here.
    image
  • Save or print and store your password key to a secure space
    image
  • Click “Start Encrypting”
    image
  • BitLocker is now encrypting the VHD file
    image

You have now created an encrypted VHD container file which you can attach to your pc or another Win7 pc via the Disk Management console.
image

Detach the encrypted VHD file

  • Open Disk Management MMC (Start – diskmgmt.msc – Return)
  • Right click onto the VHD Disk and select “Detach VHD”
    image
  • Click OK
    image

Attach the encrypted VHD file

  • Open Disk Management MMC (Start – diskmgmt.msc – Return)
  • Click Action – “Attach VHD”
    image
  • Select the VHD file and click OK
    image
  • The BitLocker window will now open to prompt you for the password
    image 
    Enter the password and click “Unlock”

Easier and more convenient way to attach and detach the VHD

An easier way to attach and detach the VHD is to create a batch file which you can run by just double clicking it.
You will need to create 4 files for it.

Attach VHD

Attach_diskpart.txt

select vdisk file="c:importantdata.vhd"
attach vdisk

Attach.bat

diskpart /s "<fullpath to>Attach_diskpart.txt"

Now you can create a shortcut to the Attach.bat file in the Startmenu which you can just click to attach the file.

Detach VHD

Detach_diskpart.txt

select vdisk file="c:importantdata.vhd"
detach vdisk

Detach.bat

diskpart /s "<fullpath to>Detach_diskpart.txt"

Now you can create a shortcut to the Detach.bat file in the Startmenu which you can just click to detach the file.

Written by Wolfgang Unger

August 9, 2009 at 16:11

Posted in Windows 7

Windows 7 – XP Mode on Acer Aspire 7720G

with 11 comments

Yesterday I was installing Windows 7 on my Acer Aspire 7720G which is my primary working machine – even though I had Windows 7 RC and Beta running at my home pc since the versions were available.

One big set back was when I installed the current Virtual PC RC onto my notebook – I wasn’t able to create a machine because Acer disabled the Intel VT in the bios and there is no way to change this in the BIOS.

After some research in the web I found a great blog entry on marcan’s blog – special thanks to him for this great tutorial! – on how to enable Intel VT in the BIOS by dumping, modifying and reflashing it.

I also found the modified script file to enable VT for my notebook from MaxL in the comments of the blog – also many thanks for this great script which made it work also for me!

DISCLAIMER / WARNING:
This howto only applies to the Acer Aspire 7720G – your BIOS might be different and you can break your notebook by following these instructions!!
In any case I do not take any responsibility if your notebook does no longer work!!
Follow the howto at your own risk!!

These are the steps how to modify your BIOS:

  • download and install Python for Windows (http://www.python.org/)
  • download the newest BIOS version 1.45 from the Acer website
  • download the vtenable.py file from MaxL
  • update the BIOS to the newest version 1.45
  • extract the BIOS flash tool executable
  • open platform.ini in the flash tool folder
  • in the FDFile section enter a filename for the BackupName e.g. dump.fd

[FDFile]
FileName=
BackupName=dump.fd

  • save the platform.ini file
  • run the InsydeFlash tool and cancel it when it asks to update the BIOS
  • the tool has now created a dump of your BIOS named dump.fd
  • open a command prompt and run 

C:pythonpython.exe C:BIOSdump.fd C:BIOSpatched.fd

This will enable VT in the BIOS settings. The BIOS itself will not be touched only the BIOS settings are updated.
Note: You should not revert the BIOS to the default settings later on as it will disable VT again!

Now it is time to flash back the patched BIOS:

  • Undo the changed in the platform.ini of the extracted flash tool (remove the dump.fd filename) and save it again
  • copy the filename of the original BIOS version into the clipboard (should be CL50145A.fd)
  • delete the original BIOS file (CL50145A.fd)
  • delete the dump.fd file
  • rename patched.fd to filename in the clipboard (e.g. CL50145A.fd)
  • Run InsydeFlash

After that you should be able to run XP Mode and other virtual machines on your notebook.

 

If you are searching for other Acer models please have a look directly on marcan’s blog – there are several very helpful posts over there.

Special thanks again to marcan and MaxL!

Written by Wolfgang Unger

August 9, 2009 at 13:06

Posted in Windows 7