HI
I have a server that run Disstiller in the background, when the program hungup, I have to kill the process "acrodist.exe" but when I restarted, it runs under the current user login. Is there a way to restart the process under a specific user account?
Thank you
This script below is from one of the forum, but it did not have a restart process part.
VBSTART
Sub killProcess(pgm)
set wmi = getobject("winmgmts:")
sQuery = "select * from win32_process " & "where name='" & pgm & "'"
set processes = wmi.execquery(sQuery)
for each process in processes
process.terminate
next
End Sub
VBEND
VBRun>KillProcess,AcroRd32.exe
Kill process, restart and run under different user
Moderators: JRL, Dorian (MJT support)
Try using the DOS "runas" command. For instruction on how to use runas, open a DOS window and type runas /?. Use the Macro Scheduler Run Program> function to run a DOS command. A quick sample would be:
Run Program>cmd /c runas [parameters]
See Macro Scheduler help for proper use of Run Program>.
Search the forum for "DOS" or "cmd" to see many examples for running DOS commands from Macro Scheduler scripts.
Run Program>cmd /c runas [parameters]
See Macro Scheduler help for proper use of Run Program>.
Search the forum for "DOS" or "cmd" to see many examples for running DOS commands from Macro Scheduler scripts.