I have 2 lines of code. I need the 1st line to run and while it is still running start the 2nd. The first line runs a powershell script that keeps the pc active. The second goes to the main script. No matter how I adjust it, it runs the 1st line and doesnt go to the 2nd. &, &&, | have not worked when combining to 1 line. Running separately, they work but I need it to go back to Master when the 1st script starts I forgot to mention, the powershell script is a repeating script that sends characters and never end till you stop it.
Powershell.exe -executionpolicy remotesigned -File \\XXX-XXXXX\share\public\it\Scripts_For_Workstations\scripts\keep_alive\mouse1.ps1
call \\XXX-XXXXX\share\public\it\Scripts_For_Workstations\XXXXXX_Master_Script.bat :SUB_Start
CodePudding user response:
You can run 2 files at once, whitch contains one line of commands, here is an example:
EXAMPLE 1:
Main file:
@echo off cls start file1 start file2 cls <Perform some actions>
File1:
<Perform some action>
File2:
<Perform some action>
EXAMPLE 2:
Main file:
@echo off cls start file1 cls <Perform some actions>
File1:
<Perform some action>