vbscript - Running an application as a different user (.bat / .vbs) -
i need restart application using service running on system account. problem application started under system account. various reasons beyond control restart system bit complicated result of complicatedness(c) i'm sure there must @ least 1 stage possible specify account app run on.
the service calls bounce.bat contains following:
@echo off cscript "c:\program files\myapp\bounce.vbs" the relevant section of bounce.vbs is:
set oprocess = owmiservice.get("win32_process") set oprogram = oprocess.methods_("create").inparameters.spawninstance_ oprogram.commandline = spath & sexe set sshell = owmiservice.execmethod("win32_process", "create", oprogram) if there no clever suggestions i'll try this approach, i'm sure there must cleaner way.
Comments
Post a Comment