hi all ! I have a script batch file that calls a powershell script on startup (already minimized) I need a way to avoid users from closing the script window file. Or if its closed a way to restart it... The batch is file cotains: Code: powershell.exe -window minimized -noexit -file "%USERPROFILE%\Desktop\UNB\script\UNBILLING.ps1" Any help is appreciated.
SilentRun.vbs Code: Set WshShell = CreateObject^("WScript.Shell"^) : WshShell.Run "Full_Path_To_Batch_File.cmd", 0 then create schedule task to run SilentRun.vbs
A PowerShell variant : Code: @powershell "Start-Process powershell -window hidden '-file \"%USERPROFILE%\Desktop\UNB\script\UNBILLING.ps1\"'"