2015年8月24日 星期一

C# Volume Control in Windows 7 音量控制

English
========================================================================
We talk about the volume control in Windows XP last article. We are introduce the volume control in Windows 7. It is easier to control the volume in Windows 7. We can use Windows API to up, down the volume. The sample code are as below.

[DllImport("user32.dll")]
public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int APPCOMMAND_VOLUME_UP = 0x0a0000;
private const int APPCOMMAND_VOLUME_DOWN = 0x090000;
private const int WM_APPCOMMAND = 0x319;

When we want the volume up, we need to use

SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (IntPtr)APPCOMMAND_VOLUME_UP);

When we want the volume down, we need to use

SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (IntPtr)APPCOMMAND_VOLUME_DOWN);


If we want to get the current volume. We find out an easy way to do it. We need to use NAudio.dll.
There are some steps to help you to use NAudio.dll.

You need to add NAudio in reference and using NAudio.CoreAudioApi


Declare the MMDeviceEnumerator.

static MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
MMDevice defaultDevice = devEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia);

Declare the update function update the volume value.

public void UpdateVolume()
{
    //Update Volume in label.
    currVolume = defaultDevice.AudioEndpointVolume.MasterVolumeLevelScalar * 100;
    double tmp = System.Convert.ToDouble(currVolume);
    int tmp2 = (int)Math.Round(tmp);    //Avoid display float volume.

    lb_Volume.Text = tmp2.ToString();
}

The application will run as below.




中文
========================================================================
上一篇說明在 Windows XP 下控制音量的程式,現在來談談 Windows 7 下,如何調整音量大小。
在 Windows 7 控制音量大小的方式更簡單,Windows 7 內建的API就可以達成,程式碼如下:

[DllImport("user32.dll")]
public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int APPCOMMAND_VOLUME_UP = 0x0a0000;
private const int APPCOMMAND_VOLUME_DOWN = 0x090000;
private const int WM_APPCOMMAND = 0x319;

使用 user32.dll 內的 SendMessageW function。

當需要聲音變大,只需加入以下程式碼:

SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (IntPtr)APPCOMMAND_VOLUME_UP);

當需要聲音變大,只需加入以下程式碼:

SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, (IntPtr)APPCOMMAND_VOLUME_DOWN);

至於要如何得到聲音大小的數值,這部分經過網路搜尋,找到比較簡單的方法就是使用 NAudio.dll 來完成,

步驟如下:
先加入 NAudio 在參考中,並使用 NAudio.CoreAudioApi


在程式碼中,先宣告 MMDeviceEnumerator:

static MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
MMDevice defaultDevice = devEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia);

宣告 update function 去更新 volume 的數值,

public void UpdateVolume()
{
    //Update Volume in label.
    currVolume = defaultDevice.AudioEndpointVolume.MasterVolumeLevelScalar * 100;
    double tmp = System.Convert.ToDouble(currVolume);
    int tmp2 = (int)Math.Round(tmp);    //Avoid display float volume.

    lb_Volume.Text = tmp2.ToString();
}

程式執行起來,會如下圖所示。



C# Volume Control in Windows XP 音量控制

English
========================================================================
We are writing volume control tool in Windows XP. We google some information that volume control in Windows XP is different with Windows Vista, Windows 7...
We have an sample code in below to show how to control volume in Windows XP.

In the form, we use track bar to control the volume and use tool tip to show the current volume.


In the code, we use Windows API to control the volume.

[DllImport("winmm.dll")]
public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);

[DllImport("winmm.dll")]
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);

When user scroll the bar, we use these API to set and get the current volume.

private void trackWave_Scroll(object sender, EventArgs e)
{
        // Calculate the volume that's being set
        int NewVolume = ((ushort.MaxValue / 10) * trackWave.Value);
        // Set the same volume for both the left and the right channels
        uint NewVolumeAllChannels = (((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16));
        // Set volume
        waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);    
     
        toolTip1.SetToolTip(trackWave, trackWave.Value.ToString());
}

When the user scroll the bar. The Wave volume will up or down.




中文
========================================================================
最近在撰寫音量控制的程式,上網查詢了一下,發現 XP 中音量控制與 Vista, Windows 7...之後系統控制的方式不相同,透過以下的範例,讓大家知道如何控制音量。

在程式介面的部分,我們使用 Track bar來進行音量大小聲的操控,並使用 Tool tip 來顯示現在音量的數值


在主程式的部分,使用 Windows 內建的 API 來進行音量的操控,

[DllImport("winmm.dll")]
public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);

[DllImport("winmm.dll")]
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);

當使用者在拉動 Track bar 時,音量控制的部分如下:

private void trackWave_Scroll(object sender, EventArgs e)
{
        // Calculate the volume that's being set
        int NewVolume = ((ushort.MaxValue / 10) * trackWave.Value);
        // Set the same volume for both the left and the right channels
        uint NewVolumeAllChannels = (((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16));
        // Set volume
        waveOutSetVolume(IntPtr.Zero, NewVolumeAllChannels);    
     
        toolTip1.SetToolTip(trackWave, trackWave.Value.ToString());
}

使用者調整拉霸,就可以對音量做控制,如下圖:



P.S 使用者調整的拉霸,對應的拉霸為 "Wave" 這條

2015年8月18日 星期二

Synchronize the time with the Windows Time service 網路校時

English
========================================================================

W32tm

25 out of 56 rated this helpful Rate this topic
A tool used to diagnose problems occurring with Windows Time

Syntax

{/config [/computer:ComputerName] [ [/update] [/manualpeerlist:ListOfComputerNames] ] [/syncfromflags:ListOfFlags] ]|/monitor|/ntte|/ntpte|/register|/resync [{:ComputerName] [/nowait]|[/rediscover}]|/tz|/unregister}

Parameters

/config [ /computer: ComputerName ] [ [ /update ] [ /manualpeerlist: ListOfComputerNames ] ] [ /syncfromflags: ListOfFlags Adjusts the time settings on the local or target computer. Time synchronization peers can be set with the /manualpeerlist switch. Changes to configuration are not used by Windows Time unless the service is restarted or the /update switch is used. /syncfromflags can be used to set the types of sources used for synchronization, and can be set to either MANUAL to use the manual peer list or DOMHIER to synchronize from a domain controller.
/monitor   Monitors the target computer or list of computers.
/ntte   Converts an NT system time into a readable format.
/ntpte   Converts an NTP time into a readable format.
/register   Register to run as a service and add default configuration to the registry.
/resync [{ : ComputerName ] [ /nowait ]|[ /rediscover }] Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize. The command will wait for resynchronization unless the/nowait switch is used. Currently used time resources will be used unless /rediscover is used, which will force redetection of network resourced before resynchronization.
/ tz   Display the current time zone settings.
/ unregister   Unregister service and remove all configuration information from the registry.
/?   Displays help at the command prompt.

Remarks

  • This tool is designed for network administrators to use for diagnosing problems with Windows Time.
    For more information, see net time in Related Topics.
  • For the Windows Time service to use the changed made with W32tm, it must be notified of the changes. To notify Windows Time, at the command prompt, type w32tm /config /update.

Examples

To display the current time zone settings, type:
w32tm /tz

Reference: MSDN



中文
========================================================================
網路校時是個很常用的工具,以下附上一些較常用的資訊供讀者參考:

1. 可以透過 cmd 下輸入 "w32tm /dumpreg /subkey:Config",去查看現在網路校時的設定


介紹一下其中兩個參數的意思,
1-1 MaxNegPhaseCorrection:此參數為負差校正,若網路時間比本地時間慢,慢的數值超過此值,即不自動校正。
1-2 MaxPosPhaseCorrection:此參數為正差校正,若網路時間比本地時間快,快的數值超過此值,即不自動校正。

此兩個數值可以在 Registry 內做更改,Registry 位置在 "HKey_Local_MACHINE\SYSTEM\CurrentControlSet\Service\W32Time\Config"。

更改完後,需在 cmd 下輸入 "w32tm /config /update"去更新組態,再輸入 "w32tm /resync"去重新網路校時。

2015年8月17日 星期一

C# Sleep, Hibernate 喚醒

English
========================================================================
Add below code in your project.

using Microsoft.Win32;


private void Form1_Load(object sender, EventArgs e)
{
        SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
}


void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
        if (e.Mode.Equals(PowerModes.Resume))
        {
                //Do  what you want when system back.
        }
}

System will occur the PowerModeChanged event when system back from Sleep or Hibernate. We can use this event to do what we want.



中文
========================================================================
在程式中增加以下程式碼:

using Microsoft.Win32;


private void Form1_Load(object sender, EventArgs e)
{
        SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
}


void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
        if (e.Mode.Equals(PowerModes.Resume))
        {
                //Do  what you want when system back.
        }
}

當系統從 S3 或 S4 恢復時,會觸發 PowerModeChange event,因此就能完成所想對應的事情。

Auto-logon on WES 2009 自動登入

English
========================================================================
Set autologon on WES 2009 image. Go to Run window and key "control userpasswords2" like below picture.


 We disable the "User must enter a user name and password to use this computer." like below picture. The system will auto-logon on next boot.




P.S The account need have password before you setting.



中文
========================================================================
設定帳號為自動登入,在執行中輸入"control userpasswords2"如下圖,



把"User must enter a user name and password to use this computer."打勾拿掉,如下圖。


P.S 帳戶需要先設定密碼才能執行。

EWF Overlay Limits on WES 2009 EWF 限制

English
========================================================================
Introduction

When using Enhanced Write Filter (EWF) in RAM or RAMREG mode several customers might assume

the EWF overlay is limited solely by the availability of physical memory. Consequently, many assume

they will be able to achieve an overlay twice as big on a system with 2 GB RAM than on a system with 1

GB RAM. This is not true by any means. This article explains the factors that limit the overlay size and

the significant improvements seen on Windows Embedded Standard 2011.

If you are interested more in the conclusion than the internals, skip the following sections and jump

directly to the “Results and Conclusion” section.

EWF memory allocation internals

EWF maintains a list of memory descriptor lists (MDLs) that describe the entire overlay. Using MDLs is

the preferred memory allocation technique for kernel mode drivers that have huge memory needs that

exceed the Paged Pool or Non Paged Pool limits. The overlay size is increased on a "need to" basis

and not pre-allocated in DriverEntry. Whenever a new write arrives and it cannot be accommodated in

the overlay, we allocate a new MDL that describes 64 KB, increasing the overlay size by 64 KB. No

more allocations are needed until we run out of this 64 KB chunk. This continues until the system cannot

allocate any more MDLs. Next, I will explain why this happens much before we actually run out of

physical memory on the system.

Each MDL describes a set of pages – in the case of EWF, we use MDLs that describe 16 physical pages

(64 KB per MDL / 4 KB per page = 16 pages per MDL). To map these 16 noncontiguous physical pages

into 16 contiguous virtual pages, the operating system needs 16 Page Table Entries (PTEs). Specifically,

it needs 16 system PTEs because MDLs don't use regular PTEs. So each time the overlay grows by 64

KB we have 16 fewer system PTEs.

System PTEs are not an unlimited resource and their total number does NOT increase linearly with

physical memory. So the EWF overlay size will be limited by the availability of system PTEs and NOT by

the availability of physical memory. Also, note that system PTEs are also used by the operating system

and other kernel mode drivers (a big chunk by the video drivers)

The next question is – How many system PTEs does Windows provide? It varies and the primary factors

are the version of Windows (Windows XP vs. Windows 7) and the processor architecture (x86 vs. x64).

The exact numbers are not documented on MSDN, but you can easily find out for yourself using

Windbg.

Using Windbg to determine the system PTE information

1. Enable kernel debugging on the target system and restart the machine. You can either debug

remotely using a serial / 1394 cable OR use local kernel debugging.

2. Launch Windbg and set the symbol path to the Microsoft public symbols server

3. Use the Windbg command “!sysptes” to get the information on system PTEs. You can use

debugger help (.hh !sysptes) for details about this command.

Results and Conclusion

o “.sympath SRV*C:\PublicSymbols*http://msdl.microsoft.com/download/symbols”

Windows Embedded Standard 2009 (32 bit edition) vs. Windows Embedded Standard 2011 (32 bit

edition)

Note: On Windows XP, there is a memory management setting that can help increase the system PTEs

(compared to default behavior on Windows XP). To use this, set the following REG_DWORD to 0xffffffff.

“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory

Management! SystemPages”. This setting is not used by the Memory Manager in Windows 7.

Here’s how you should interpret the results - On Windows Embedded Standard 2009 with 2GB of RAM,

system PTEs can only describe up to 1007484 KB (~ 984MB). The EWF overlay limit will be lesser than

this owing to system PTE usage by other drivers and the operating system. In my experiments, I

observed this usage to be around 300MB, thus limiting the EWF overlay to about 684 MB. The

improvement in Windows Embedded Standard 2011 is impressive and hard to miss. On Windows

Embedded Standard 2011 with the same configuration, system PTEs can describe up to 1709952 KB

(1670 MB). Assuming similar system PTE usage by other components, EWF overlay can be as large as

1370 MB. The overlay limit has roughly doubled from Windows Embedded Standard 2009 to Windows

Embedded Standard 2011.

You will also notice that limits on 2GB system are smaller than that on a 1GB system. To reiterate my

earlier point, system PTEs don’t increase linearly with RAM. With more physical memory, the kernel

needs to maintain larger book keeping structures (such as the PFN database), hence the increasing

physical memory from 1 GB to 2 GB is not beneficial if you are looking to improve overlay limit. It is

however beneficial for RAM hungry user mode processes.

Windows Embedded Standard 2011 (64 bit edition)

On 64 bit edition of Windows, the kernel address space is much larger (both theoretical and supported)

and system PTEs can describe up to 128 GB of RAM. However, EWF on Windows Embedded Standard

2011 has only been tested on systems up to 4 GB of RAM. If you have embedded scenarios that use

more RAM, please provide feedback either on the forums or the connect website. Refer to the product

documentation that will accompany Windows Embedded Standard 2011 RTM for the final word on this.

Conclusions and call for action

1. Estimate the overlay needs for your embedded scenario, compare it with the chart above and

decide the correct platform (Windows Embedded Standard 2009 or Windows Embedded

Standard 2011).

2. Consider using 64 bit edition of Windows Embedded Standard 2011 if you need more overlay

space than what is offered by the 32 bit edition.

3. As always, provide feedback!


Reference: Windows Embedded



中文
========================================================================
在 EWF RAM 或是 EWF RAM(Reg) mode 使用上,經過測試發現會有一些限制,上面是我之前在搜尋資料所找到的文章,從文章可以發現,在 EWF RAM 或是 EWF RAM(Reg) mode 中,最多能使用的記憶體空間約為500 MB,當超過500 MB時,系統會開始不聽使喚,有可能連執行關機的指令都有問題,必須強制斷電進行重開機。

EWF RAM and RAM(Reg) Mode 續談 EWF

English
========================================================================
There are three different modes of EWF based on the different configurations for the EWF overlay and the EWF volume.
EWF ModeEWF Overlay LocationEWF Volume LocationDescription
DiskOn diskCreated on disk in unpartitioned spaceEWF stores overlay information in a separate partition on the system. Because the overlay is stored in a nonvolatile location, the EWF overlay information can persist between reboots.
Use EWF Disk types on a system if you want to maintain the state of the system.
For more information, seeEWF Disk Mode.
RAMIn RAMCreated on disk in unpartitioned spaceEWF stores overlay information in RAM. When the system is rebooted, all of the information in the overlay is discarded.
Use EWF RAM types on systems if you want to discard any write information after reboot, or to delay writing the overlay to the media.
For more information, seeEWF RAM Mode.
RAM RegIn RAMIn system registrySimilar to EWF RAM types, RAM Reg overlays store overlay information in RAM. However, the configuration information about EWF is not stored in a separate EWF volume, but within the registry.
Use EWF RAM Reg types on media that does not support changing the partition structure of the media, such as CompactFlash. CompactFlash media is typically marked as removable media. Removable media cannot be partitioned. For more information, seeCompactFlash Design Considerations.
For more information, seeEWF RAM Reg Mode.
Reference by MSDN



中文
========================================================================
EWF 第二種 mode 為 RAM mode,此保護機制是使用把所有原本要寫到 HDD 內的修改,全部轉存在 RAM 上,由於 RAM 的特性,在系統斷電或是重新開機時,會清除 RAM 上的資料,藉此保持系統的安全與完整性。RAM mode的配置如下:
1. EWF 覆蓋層儲存於記憶體中
2. EWF volume 儲存於磁碟中


EWF RAM mode 所配置的 RAM 的大小,為非預先配置,因此 EWF RAM mode 能使用的 free 記憶體大小,最多為系統所剩下的 free 記憶體大小。


EWF 第三種 mode 為 RAM(Reg) mode,此保護機制與 RAM mode 相似,不同的地方為此 mode 把 EWF  volume 改存在系統的 Registry 中,因此 RAM(Reg) mode 的配置如下:
1. EWF 的覆蓋儲存於記憶體中
2. EWF volume 是儲存於注冊表中



2015年8月16日 星期日

Enhanced Write Filter (EWF) overview 初談EWF

English
========================================================================
The Enhanced Write Filter (EWF) protects a volume from write access. EWF provides the following benefits:
  • Write-protects one or more partitions on your system
  • Enables read-only media, such as CD-ROM or flash, to boot and run
EWF can be deployed on a variety of media types and configurations. The two major components for EWF are the EWF Overlay and the EWF Volume:
  • EWF Overlay: EWF protects the contents of a volume by redirecting all write operations to another storage location. This location is called an overlay. An EWF overlay can be in RAM, or on another disk partition. An overlay is conceptually similar to a transparency overlay on an overhead projector. Any change that is made to the overlay affects the picture as it is seen in the aggregate, but if the overlay is removed, the underlying picture remains unchanged. For more information, see EWF Modes.
  • EWF Volume: In addition to the EWF overlay, an EWF volume is created on the media in unpartitioned disk space. This EWF volume stores configuration information about all of the EWF-protected volumes on the device, including the number and sizes of protected volumes and overlay levels. Only one EWF volume is created on your device, regardless of how many disks are in the system. If your media does not support multiple partitions, you can save the EWF configuration information in the system's registry. For more information, see EWF Volume Configuration.
    There can be only one EWF volume on the system. However, there can be more than one protected volume, and it is possible to have some volumes that are protected by disk overlays while others are protected by RAM overlays.
There are three different modes of EWF based on the different configurations for the EWF overlay and the EWF volume.
EWF ModeEWF Overlay LocationEWF Volume LocationDescription
DiskOn diskCreated on disk in unpartitioned spaceEWF stores overlay information in a separate partition on the system. Because the overlay is stored in a nonvolatile location, the EWF overlay information can persist between reboots.
Use EWF Disk types on a system if you want to maintain the state of the system.
For more information, seeEWF Disk Mode.
RAMIn RAMCreated on disk in unpartitioned spaceEWF stores overlay information in RAM. When the system is rebooted, all of the information in the overlay is discarded.
Use EWF RAM types on systems if you want to discard any write information after reboot, or to delay writing the overlay to the media.
For more information, seeEWF RAM Mode.
RAM RegIn RAMIn system registrySimilar to EWF RAM types, RAM Reg overlays store overlay information in RAM. However, the configuration information about EWF is not stored in a separate EWF volume, but within the registry.
Use EWF RAM Reg types on media that does not support changing the partition structure of the media, such as CompactFlash. CompactFlash media is typically marked as removable media. Removable media cannot be partitioned. For more information, seeCompactFlash Design Considerations.
For more information, seeEWF RAM Reg Mode.
Reference from MSDN

中文
========================================================================
EWF 是微軟提出一種保護硬碟的方法,此方法可以避免作業系統受到不正常的使用,造成資料的損毀。EWF 的作用原理,大致上就是把系統開機後所更改的所有設定,鏡射到 HDD 或 RAM 上,當系統重新開機時,會把 HDD 和 RAM 上的資料全部清除掉,來達到防寫的功能。
EWF 有三種 mode,第一種為 Disk mode,此方式需要再建立硬碟 partition 時,須預留未配置的空間,以供給給 EWF 使用;當系統在執行 First Boot Agent (FBA)時,他會先創立一個名為 EWF partition 的空間,在 EWF partition 中,又包含 EWF volume 和 EWF disk overlay,EWF volume為一個小於32MB的空間,他記錄 EWF 中所需的資料,EWF disk overlay為類似之前 Windows 的還原點,EWF 可以建立最多9個還原點,讓客戶自由設定;EWF Disk mode 的配置如下圖:


下圖為系統有使用多個 EWF disk overlay,每個 EWF disk overlay 都記錄當時作業系統的狀態,使用者可以依造自己的需求,做不同狀態的還原。



BIOS IDE/AHCI mode effect system reboot 硬碟設定造成系統一直重開機

English
========================================================================
We can find out that the SATA has IDE and AHCI modes in BIOS advanced configure settings. The Settings like below picture.


If we install the Windows XP with IDE mode. We use tap.exe tool to capture *.pmq file that we can find the Standard PC component. If we install the Windows XP with AHCI mode. We use tap.exe tool to capture *.pmq file that we can find the ACPI Uniprocessor PC or ACPI multiprocessor PC component.

If we change the SATA configuration in BIOS. The system will always reboot and can not enter the OS. Thus, We need to check the BIOS settings before we build the WES 2009 image.


中文
========================================================================
在 BIOS 下進階的選單中,設定 SATA  mode 有 IDE 和 AHCI 兩種 mode,如下圖顯示:


當一開始選擇的 mode 為 IDE 時,透過 tap.exe 所抓出來的 *.pmq 檔案會抓到 Standard PC 的元件;假設一開始選擇 mode 為 AHCI ,透過 tap.exe 所抓出來的 *.pmq 檔案會抓到 ACPI Uniprocessor PC 或 ACPI Multiprocessor PC 的元件。

當 BIOS 設定切換時,如果沒有加入正確的元件,會造成系統一直重開機。

IIS components WES 2009 IIS 元件

English
========================================================================
We want to use IIS in WES 2009 image. We need add below components.
  • IIS Core Libraries
  • IIS Common Libraries
  • IIS Documentation
  • IIS FTP Server
  • IIS Internet Manager
  • IIS Virtual Printer Directory
  • IIS Virtual Script Directory
  • IIS Web Server
  • Internet Information Services Technologies (IIS)
  • .NET Framework 1.1
  • ASP.NET 1.1




中文
========================================================================
如何讓WES 2009的image使用IIS,只需增加以下的元件:
  • IIS Core Libraries
  • IIS Common Libraries
  • IIS Documentation
  • IIS FTP Server
  • IIS Internet Manager
  • IIS Virtual Printer Directory
  • IIS Virtual Script Directory
  • IIS Web Server
  • Internet Information Services Technologies (IIS)
  • .NET Framework 1.1
  • ASP.NET 1.1



2015年8月14日 星期五

WES 2009 Hang on Windows is Shutting down 擦入隨身碟無法關機

English
========================================================================
We find out that when we insert the usb flash. The system can not shutdown successfully. The system will hang on below screen. We try to copy the usb driver from XP to WES 2009. We find out that it is works. The usb driver which we replace is named usbstor.sys.





中文
========================================================================
製作完成的WES 2009 image,當擦入USB隨身碟時,會造成系統停在關機中的畫面,由於發生此狀況跟USB隨身碟是否有存在相關,因此朝USB driver方向處理,嘗試替換XP內的USB driver,發現可以解決,替換的USB driver名稱為 usbstor.sys




WES2009 Set default wallpaper 開機後桌布消失

English
========================================================================
We can use Target Designer to build the WES2009 image. We will find that the wallpaper does not show. We can add the registry to solve the problem. The registry is HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper\C:\WINDOWS\Web\Wallpaper\Windows Embedded.bmp





中文
========================================================================
    使用Target Designer去製作WES2009 image,會發生FBA後桌布消失的狀況,解決方法只需在 Target Designer 增加一個註冊機碼即可。



    只需要在Value的部分輸入想要的桌布檔名,即可完成預設桌布的部分。

OS Operating System 作業系統 恐龍書 筆記分享

發現一個作業系統說明的網站, 對於 process vs thread, semaphore vs mutex, deadlock 說明很詳細, 有興趣的人可以去以下的網頁逛逛。 附上網址連結: link   link2