Windows 7:休眠后计划任务无法启动


1

我创建了一个共享WiFi的任务:

netsh wlan start hosted network

此任务已配置为系统启动和用户登录,并且工作正常,除非我休眠我的笔记本电脑(WiFi不重启)。

有人知道为什么吗?

以下是用XML提取的整个任务:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2013-11-11T08:12:48.430373</Date>
    <Author>computername\json</Author>
    <Description>starting hosted network</Description>
  </RegistrationInfo>
  <Triggers>
    <BootTrigger>
      <Enabled>true</Enabled>
    </BootTrigger>
    <LogonTrigger>
      <Enabled>true</Enabled>
    </LogonTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>computername\json</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>true</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>true</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>netsh.exe</Command>
      <Arguments>wlan start hostednetwork</Arguments>
    </Exec>
  </Actions>
</Task>

你是什​​么意思“WiFi不重启”,你是说你的wifi被禁用或在休眠后登录时仍然断开连接?
詹姆斯T

Answers:


2

您可以为“on Workstation unlock”添加触发器。如果这对您不起作用,您还可以触发事件协议“System”,源“Power-Troubleshooter”,事件ID“1”(“系统已从省电模式重新激活。”)

(不确定准确的措辞,我正在使用德语Windows 7.)


0

您的触发器设置为在引导和登录时调用操作。为某些系统ID事件设置触发器可能会更好。

这些有趣的事件可以在Kernel-Power和Power-Troubleshooter Logs中找到。唤醒是来自Power-Troubleshooter的事件,事件ID为1,系统休眠在内核 - 电源中生成ID42的事件

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.