1

I have created a task for sharing WiFi using :

netsh wlan start hosted network

This task has been configured for both System Start and User Logon and works fine except when I hibernate my laptop (WiFi not restarting).

Does somebody know why ?

Here is the entire task extracted in 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>
1
  • What do you mean by "WiFi not restarting", are you saying that your wifi is disabled or remains disconnected when you log in after a hibernate?
    – James T
    Dec 10, 2013 at 2:51

2 Answers 2

2

You could add a Trigger for "on Workstation unlock". If this does not work for you, you could also trigger on an event protocol "System", source "Power-Troubleshooter", event ID "1" ("The System was reactivated from power save mode.")

(Not sure about the exact wordings, I am working with a German Windows 7.)

0

your triggers are set to call the action on boot and on logon. you may be better off with setting a trigger to certain System-ID Events.

These interesting Events can be found in Kernel-Power and Power-Troubleshooter Logs. Wakeup is an event from Power-Troubleshooter with Event ID 1 and System Sleep generates a Event with ID42 in Kernel-Power

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .