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

Discus and support Start VM via bat file in Windows Task Scheduler in Windows 10 Virtualization to solve the problem; 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... Discussion in 'Windows 10 Virtualization' started by WinScott, May 12, 2018.

  1. WinScott Win User

    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"[/quote]
    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>[/quote]

    :)
     
    WinScott, May 12, 2018
    #1
  2. WinScott Win User

    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"[/quote]
    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>[/quote]

    :)
     
    WinScott, May 12, 2018
    #2
Thema:

Start VM via bat file in Windows Task Scheduler

Loading...
  1. Start VM via bat file in Windows Task Scheduler - Similar Threads - Start via bat

  2. Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    in Windows 10 Gaming
    Windows Task Scheduler - Running a .BAT File whether user is logged on or not: Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command...
  3. Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    in Windows 10 Software and Apps
    Windows Task Scheduler - Running a .BAT File whether user is logged on or not: Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command...
  4. Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    in Windows 10 Customization
    Windows Task Scheduler - Running a .BAT File whether user is logged on or not: Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command...
  5. Trying to run Powershell command in a .BAT file via scheduled tasks results in UAC request.

    in Windows 10 Network and Sharing
    Trying to run Powershell command in a .BAT file via scheduled tasks results in UAC request.: As above - I'm trying to run a simple Powershell command via a Batch File to capture the programs that are accessing the Internet. I'm running this via Scheduled Tasks in order to check when a particular program has finished its own task. This will run all night if...
  6. Scheduled Task Won't Launch Program with .bat File

    in Windows 10 Customization
    Scheduled Task Won't Launch Program with .bat File: I wrote a couple simple bat files to both shut down and launch Adobe Media Encoder on a Windows 10 machine. When I double click on them, both launch and execute flawlessly. However when I schedule a task and click to run them from the scheduled task, the status just shows...
  7. Task Scheduler and Bat File Problem

    in Windows 10 Support
    Task Scheduler and Bat File Problem: 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 server again. It works...
  8. Start Batch File Minimized via Task Scheduler

    in Windows 10 Support
    Start Batch File Minimized via Task Scheduler: 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. The particular batch...
  9. bat job started by Task Scheduler does not pause

    in Windows 10 Support
    bat job started by Task Scheduler does not pause: In the last week or so all bat jobs started by Task Scheduler have not paused. Previously, I would find a black CMD window open, waiting for me to hit return to close the window. The following test indicates that the bat job ran, but it did not pause. TEST.BAT time /T >...
  10. Cannot run BAT file with Task Scheduler "Access Denied".

    in Windows 10 Support
    Cannot run BAT file with Task Scheduler "Access Denied".: Hi all. I am learning some basic batch scripting and I've created a file with the following code: [img] All this does is move various file types to various folders to clean up my desktop. If I click on the .bat file directly it works great. But if I try to run it...