Posted January 3, 20178 yr Hello, I have not been able to complete the execution of this batch file. I have verified that it is indeed correct in syntax, as it runs locally just fine. TASKKILL /f /im iexplore.exe CD "C:\Program Files (x86)\Internet Explorer" timeout /t 5 start iexplore.exe In essence the code is meant to close Internet Explorer, and restart it upon the 5 second timeout period. But, it seems like it only executes the first part of the code successfully. Internet Explorer closes, but nothing else happens. (no errors in pulseway log). Feel free to run the code as it isn't malicious. Am I missing something to make work? Thanks and I hope to get a response soon. I would greatly appreciate the continued support.
January 3, 20178 yr Administrators Please note that scripts will run in an isolated session (session zero) which means that all GUI applications will run in a session that's not visible to the console. This has been done to enhance the security and privacy of the end user and to support running scripts while there is no logged in user. You could try using the Enter-PSSession PowerShell cmdlet to join a user session. -Paul
January 3, 20178 yr Author Hello, I put in the Enter-PSSession, and saved it as a Powershell script. Enter-PSSession -ComputerName computer1 TASKKILL /f /im iexplore.exe CD "C:\Program Files (x86)\Internet Explorer" timeout /t 5 start iexplore.exe It receives the following response. ERROR: Input redirection is not supported, exiting the process immediately. It still closes the program, however still does nothing else.
January 3, 20178 yr Author I found out ERROR: Input redirection is not supported, exiting the process immediately. Was associated with time timeout command. Upon removing that, the command ignores the following: CD "C:\Program Files (x86)\Internet Explorer" start iexplore.exe
January 10, 20178 yr Staff Try to use something like this (via PowerShell): $j = Start-Job -ScriptBlock { TASKKILL /f /im iexplore.exe } Wait-Job $j -Timeout 5 | out-null if ($j.State -eq "Completed") { CD "C:\Program Files (x86)\Internet Explorer" start iexplore.exe }
Create an account or sign in to comment