/build/static/layout/Breadcrumb_cap_w.png

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|]

0 Comments   [ + ] Show comments

Answers (9)

Posted by: AngelD 15 years ago
Red Belt
0
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 15 years ago
Blue Belt
0
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.
Posted by: AngelD 15 years ago
Red Belt
0
Gread that you found a solution.
I've only used the script while the user was logged in so a shot in the dark [;)]
Posted by: verukins 13 years ago
Senior Yellow Belt
0
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 ?
Posted by: anonymous_9363 13 years ago
Red Belt
0
Try adding the '/accepteula' argument to your command line.
Posted by: verukins 13 years ago
Senior Yellow Belt
0
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.
Posted by: anonymous_9363 13 years ago
Red Belt
0
Although you have a solution (I *love* HTAs, BTW - scripting+GUI - I'm in heaven!) I'm intrigues to know what the restriction is. Have you tried running the script using the System account (via the old 'AT hh:mm CMD /interactive' ploy to get a System-level command prompt)?
Posted by: verukins 13 years ago
Senior Yellow Belt
0
:-) 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.
Posted by: anonymous_9363 13 years ago
Red Belt
0
The "problem" with .Net is that to do the UI stuff, you need a development environment, whereas with HTAs, you need only a text editor.

Do post your solution if you ever track it down. As I say, I'm intrigued.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ