无人值守安装的FirstLogonCommands 项

为Windows 安装系统的时候,可以制作一个unattended 文件来实现自动安装,如此,在无必要守在电脑旁边,一个一个的next。

当安装完成之后,想运行个别指令,而且只是想运行一次。则可以在xml文件中加入firstlogoncommands的item。如下文字是摘录ADK中的描述。没有翻译过来,操作很简单。


FirstLogonCommands specifies commands to run the first time a user logs on to the computer. These commands run only once.

When a user with administrative privileges logs in for the first time, these commands are run with elevated access privileges.

Note
In Windows® 8 oobe.cmd and Setupcomplete.cmd are disabled if an OEM product key is used. This is to ensure that end users reach Start as quickly as possible. Any tools or services that use this infrastructure need to be moved to post Out-Of-Box Experience (OOBE) tasks.
Note
If you create a user account that does not include administrative privileges, the commands may not be executed:
  • If User Account Control is enabled, then when that user logs in for the first time, a dialog box appears, prompting the user with an option to allow an administrator to apply the commands. If the user selects Cancel, these commands are not executed.

  • If User Account Control is disabled, these commands are not executed.

The commands run after logon, prior to showing the desktop.

The commands run in the order specified. Each command must finish before the next command runs.

If the command launches a separate system process, the system process will run independently of the commands. This enables you to create commands that terminate quickly, allowing the user to reach the desktop faster.

Other processes, such as services, are not restricted by FirstLogonCommands and will continue to start or to terminate independently.

To start a command that needs to finish before other commands can start, use FirstLogonCommands. To run services or commands that can start at the same time, use LogonCommands instead.

Child Elements

SynchronousCommand

Specifies a command to run the first time a user logs on to the computer, its description, and the order in which it is run.

Valid Configuration Passes

oobeSystem

Parent Hierarchy

Microsoft-Windows-Shell-Setup | FirstLogonCommands

Applies To

For a list of the supported Windows® editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML Example

The following XML output shows how to specify two commands to run after first logon.

 Copy Code
<FirstLogonCommands>
   <SynchronousCommand wcm:action="add">
      <CommandLine>c:\synccommands\command1.exe</CommandLine>
      <Description>Description_of_command1</Description>
      <Order>1</Order>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
      <CommandLine>c:\synccommands\command2.exe</CommandLine>
      <Description>Description_of_command2</Description>
      <Order>2</Order>
   </SynchronousCommand>
</FirstLogonCommands>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值