Windows 10: Start VM via bat file in Windows Task Scheduler


  1. Posts : 2
    Windows 10Pro x64
       12 May 2018 #1

    Start VM via bat file in Windows Task Scheduler


    I'm attempting to start a VM from a bat file with Windows 10 Task Scheduler.

    The bat by itself and the script via CMD execute correctly, though I cannot get it to run as a bat in Task Scheduler. I've tried different configurations, directly from a CMD, etc. Interesting note...my suspend VM task executes from a similar bat file in Task Scheduler.

    Script:
    Code:
    vmrun start "G:\Virtual Machines\SETI\SETI.vmx"

    Task Scheduler Task:
    Code:
    <?xml version="1.0" encoding="UTF-16"?>  
    <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">  
      <RegistrationInfo>  
        <Date>2018-05-11T17:16:20.4811409</Date>  
        <Author>Computer\User</Author>  
        <URI>\Start SETI VM</URI>  
      </RegistrationInfo>  
      <Triggers>  
        <CalendarTrigger>  
          <StartBoundary>2018-05-12T13:00:00</StartBoundary>  
          <Enabled>true</Enabled>  
          <ScheduleByDay>  
            <DaysInterval>1</DaysInterval>  
          </ScheduleByDay>  
        </CalendarTrigger>  
      </Triggers>  
      <Principals>  
        <Principal id="Author">  
          <UserId>S-1-5-21-3014447340-4107568225-1465194199-1001</UserId>  
          <LogonType>Password</LogonType>  
          <RunLevel>LeastPrivilege</RunLevel>  
        </Principal>  
      </Principals>  
      <Settings>  
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>  
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>  
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>  
        <AllowHardTerminate>true</AllowHardTerminate>  
        <StartWhenAvailable>false</StartWhenAvailable>  
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>  
        <IdleSettings>  
          <StopOnIdleEnd>true</StopOnIdleEnd>  
          <RestartOnIdle>false</RestartOnIdle>  
        </IdleSettings>  
        <AllowStartOnDemand>true</AllowStartOnDemand>  
        <Enabled>true</Enabled>  
        <Hidden>false</Hidden>  
        <RunOnlyIfIdle>false</RunOnlyIfIdle>  
        <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>  
        <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>  
        <WakeToRun>false</WakeToRun>  
        <ExecutionTimeLimit>PT1H</ExecutionTimeLimit>  
        <Priority>7</Priority>  
        <RestartOnFailure>  
          <Interval>PT1M</Interval>  
          <Count>3</Count>  
        </RestartOnFailure>  
      </Settings>  
      <Actions Context="Author">  
        <Exec>  
          <Command>D:\Documents\Scripts\vmware-start-SETI.bat</Command>  
        </Exec>  
      </Actions>  
    </Task>
      My ComputerSystem Spec


  2. Posts : 2
    Windows 10Pro x64
    Thread Starter
       12 May 2018 #2

    Making some headway...

    Task works if I run it as "Run only when user is logged on", but not under "Run whether user..."

    I have "Run with highest privileges" enabled.
      My ComputerSystem Spec


 

Related Threads
Solved Task Scheduler Will Not Start in General Support
Hey everyone, Have an issue with task scheduler not stating which is causing issues with say Nvidia Geforce Experience not starting as it requires it to update. When I try to start it from services I get that error. 175316 When I try to...
I have a batch file scheduled to run in Task Scheduler in Windows 10. The batch file runs on schedule, but it opens a full CMD window. I have tried entering variations on start /min in the Task Scheduler properties, but these seem to have no effect....
Hi, Not sure which forum to post this in, but hopefully someone has some insight and can help me with this. I have a simple .bat file that stops my media server, creates an archive of a folder (for backup purposes), and then starts the media...
Hello Community! I'm trying to get BBC iPlayer downloads to start automagically at 2100 so that it can start downloading Doctor Who. I'd like it to start minimized, but I am unsure how to do so. In addition to this, does anyone know if there...
file save & task scheduler in Network and Sharing
I save my backup files on a separate PC which I am using for storage of pictures . how can I setup the task scheduler on my main PC to start my 2nd PC to backup my files, and after 30minutes using the task scheduler on PC 2 to ask if I wanted to...

Tags for this Thread

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 18:39.
Find Us