Posted November 23, 20168 yr Hi All, Â When a proces has been killed or not responding. I want to restart it with a script. Example: Icloud program stopped working (Proces named: icloud.exe) located C:\Program Files\Icloud\Icloud.exe. Now i make a script : "C:\Program Files\Icloud\Icloud.exe" If i run that script on the system it doesnt start icloud again. Is my script incorrect? Pulseway notify's me it was done succesfully but it didn't start. (Took 2 seconds) I also tested this with notepad: C:\Windows\System32\notepad.exe also this one didnt start up. Ill hope you guys can tell me what i'm doing wrong. Â Kind Regards, Danny
November 23, 20168 yr Administrators Hi Danny, If you want to start a windows service you should use the "net start serviceName" command however if you want to start GUI applications in the console session you need to use PowerShell, setup the PowerShell impersonation in the Pulseway Manager app in the Settings -> Runtime tab and finally use Start-Job { C:\Windows\System32\notepad.exe } . -Paul
November 24, 20168 yr Author 19 hours ago, Paul said: Hi Danny, If you want to start a windows service you should use the "net start serviceName" command however if you want to start GUI applications in the console session you need to use PowerShell, setup the PowerShell impersonation in the Pulseway Manager app in the Settings -> Runtime tab and finally use Start-Job { C:\Windows\System32\notepad.exe } . -Paul Hi Paul, I didn't work that much with powershell. In Pulseway I found the way how to impersonate but if I fill in my credentials from Windows it doesn't work. Do I need to configure this in powershell also or is that not necessary? - Danny Agrippa
November 25, 20168 yr Administrators 23 hours ago, Danny Agrippa said: Hi Paul, I didn't work that much with powershell. In Pulseway I found the way how to impersonate but if I fill in my credentials from Windows it doesn't work. Do I need to configure this in powershell also or is that not necessary? - Danny Agrippa It should work... Can you please PM me your email address so we can get in touch via email to see what the problem is? -Paul
April 11, 20196 yr Try running your script like this: start C:\Windows\System32\notepad.exe That should launch the app on the agent Desktop.
August 2, 20195 yr On 11/24/2016 at 1:28 AM, Paul said: Hi Danny, If you want to start a windows service you should use the "net start serviceName" command however if you want to start GUI applications in the console session you need to use PowerShell, setup the PowerShell impersonation in the Pulseway Manager app in the Settings -> Runtime tab and finally use Start-Job { C:\Windows\System32\notepad.exe } . -Paul Hi Paul, I have the same issue, just the difference is that I want to start Dropbox. I checked your instructions but under Runtime tab, I can't see any thing for Start-Job. All I can see is an option for Enable PowerShell User Impersonation and fields for Username and password. Could you please assist me that what step I am missing. Thank you. Kind regards, Varinder
August 19, 20195 yr Staff Hi @Varinder, If you want to run the application in users session with GUI, then you will need to use the PsExec to do that. Quote  However if you want to start the service in user session, then you might do it using powershell after you have enabled the Powershell Impersonation using required user account.
August 6, 20204 yr if you like to run a command as the user a quick way is to create and run a scheduled task setup as the logged in user and run it, see power shell example to start and restart explorer. Â #By eDecisions $TasknameStop = "ExplorerStop" $TasknameStart = "ExplorerStart" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStop /RU $lastlogon /TR "taskkill /f /im explorer.exe" SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStart /RU $lastlogon /TR "explorer.exe"Â start-sleep -s 1 schtasks /Run /TN $TasknameStop start-sleep -s 1 schtasks /Run /TN $TasknameStart start-sleep -s 1 schtasks /delete /tn $TasknameStop /f schtasks /delete /tn $TasknameStart /f
Create an account or sign in to comment