How to pop up a message box when no user is logged on
As most SMS administrators know, you can set up a program to run "Only when no user is logged on", which is very useful for installing programs that might otherwise conflict with whatever else the logged on user has running. However, when the user logs out, there is no indication to the user that an installation is running and thus, the user can log back in, or shutdown the computer!
Does anyone know of a way to pop up a message box stating something like "An installation is running, please do not shutdown or log in" when there is no user logged in?
[8|]
Does anyone know of a way to pop up a message box stating something like "An installation is running, please do not shutdown or log in" when there is no user logged in?
[8|]
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
AngelD
16 years ago
Could you try:
SMSClientShowMessage "Application Management", "Installation corrently in progress", 1
Sub SMSClientShowMessage(strTitle, strText, intMessageType)
Dim objUIEvents
On Error Resume Next
Set objUIEvents = CreateObject("SMSCliUI.UIEvents")
objUIEvents.ShowMessage strTitle, Replace(strText, "\n", vbNewLine), intMessageType
Set objUIEvents = Nothing
End Sub
Posted by:
MicrosoftBob
16 years ago
I've tried your code and it only displays the window if a user is logged on.
I found a utility, psexec, which will display a window on the logon screen. Actually, I've had it all along, just didn't know about the -x option that specifies to run the window on the winlogon desktop.
Thanks for the response, anyway.
I found a utility, psexec, which will display a window on the logon screen. Actually, I've had it all along, just didn't know about the -x option that specifies to run the window on the winlogon desktop.
Thanks for the response, anyway.
Posted by:
AngelD
16 years ago
Posted by:
verukins
14 years ago
Hey - i found this article as im looking to do the same thing - however im having some trouble getting the GUI to display at the logon screen with -x
I can get a command prompt showing up - but whenever i start a vbscript, it is fine if im logged on, as it will default to the user session, but it will not run as system at the logon desktop.
are you able to provide an example of how you did it ?
I can get a command prompt showing up - but whenever i start a vbscript, it is fine if im logged on, as it will default to the user session, but it will not run as system at the logon desktop.
are you able to provide an example of how you did it ?
Posted by:
verukins
14 years ago
yer, thats already in there... not the issue
interesting inve foudn that if i run an .exe or a bat (or a hta) - the program runs fine
if i run cscript with an arguement, no matter the psexec commands, it still runs in the user session.... interesting.... its a simple command cscript <path><scriptname>
to that end ive changed over my program to a HTA - and it now runs fine.
interesting inve foudn that if i run an .exe or a bat (or a hta) - the program runs fine
if i run cscript with an arguement, no matter the psexec commands, it still runs in the user session.... interesting.... its a simple command cscript <path><scriptname>
to that end ive changed over my program to a HTA - and it now runs fine.
Posted by:
anonymous_9363
14 years ago
Posted by:
verukins
14 years ago
:-) im a bit the oppoisite - i used to script and hta alot, but now i find i only do it when necessary - some of the stuff you casn do is pretty cool - but i find your better off going to .net as soona s you need a gui (i should point out i hate c# - but can do stuff i have to!)
i too am interested as to why the cscript wont run on the desktop... i added the command via AT - still the same issue - do see the command prompt flash up quickly.
In addition, i noticed that running the hta on windows 7 - doesnt show up (know its running, can see the process initiated) - so looks like its only a solution for XP.
i too am interested as to why the cscript wont run on the desktop... i added the command via AT - still the same issue - do see the command prompt flash up quickly.
In addition, i noticed that running the hta on windows 7 - doesnt show up (know its running, can see the process initiated) - so looks like its only a solution for XP.
Posted by:
anonymous_9363
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.