Hi everyone,
OK, my problem is this.....

I have got an msi that is installing a new company wide screensaver, basically overwriting files etc.

But, where my problem lies is where I want to incorporate a bit of logic via VBscript that kills the screensaver if it's running. This then will allow me to replace certain screensaver files that are otherwise "locked" unless I kill the screensaver.

I have included the script used to kill the process (*.scr) in my msi and I have it running as a Deferred Execution - System Context Custom Action. However, it doesn't seem to kill the process when i install the msi.

If I run the msi manually when I have the preview box for the screensaver open it seems to kill the process and the screensaver in the preview box but when the screensaver is running as normal (not in preview), the screensaver isn't stopped and the process isn't killed.

My question is, does anyone know in what context the screensaver (.scr) process runs in when it's running full screen, main mode.

It runs in User Context when previewing it in the preview pain.

0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


I've discovered how to do it vis script.

We need SeDebugPrivilege to kill a screensaver executing under a different security context - i.e when running as normal as opposed to when you preview it. The following section of code sorted it out coupled with the rest of my script to kill a process.

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

' we need SeDebugPrivilege to kill screensaver executing under a different security context
objWMIService.Security_.ImpersonationLevel = 3
objWMIService.Security_.privileges.addasstring "SeDebugPrivilege", True

Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name Like '%.scr'")

For Each objProcess in colProcessList
Answered 06/08/2007 by: mark_holland21
Fourth Degree Green Belt

Please log in to comment