Solved

How to display a popup message before logon

Posted on 2011-09-08
15
345 Views
Last Modified: 2012-05-12
Hi experts!

--first-- please read carefully: the LegalNoticeCaption registry key is not only known to me but also not applicable in my problem environment. Also, scripts with msg.exe don't work here (but I don't know why).

I am trying to achieve the following: the computer starts, some service writes a log on startup and I would like to have the contents of this log displayed even before logging in.
I thought of using msg.exe in a startup script that reads out my logfile and uses it as message, addressed to * which SHOULD include the system account. So I setup a scheduled task that is triggered on system startup that basically does
msg * text
Task history shows it has been running, but no message is displayed. If I start the task manually from remote, a message gets displayed (!?) - which finally leads us to my big questions:

**Why would the task produce an invisible popup when triggered automatically at system startup?**
and
**if there is no way to make it work with msg.exe, what else could I do?**
and, if anybody would like to earn bonus points and sympathy:
**is there any way to display html-content prior to logging on?**

0
Comment
Question by:McKnife
  • 7
  • 7
15 Comments
 
LVL 66

Expert Comment

by:johnb6767
ID: 36504864
"**Why would the task produce an invisible popup when triggered automatically at system startup?**"

If it runs under the SYSTEM account, it is on the hidden session's desktop, not the logging in user's.....

This should explain  in more details....
http://windowsteamblog.com/windows/b/developers/archive/2009/10/01/session-0-isolation.aspx

And FYI, I am not a programmer....

Does this have to be done before logon?
0
 
LVL 53

Author Comment

by:McKnife
ID: 36504949
Hi I've heard of session 0 isoltaion but cannot see a connection right now. The task does not run as system but as a user account. As I wrote, when I start task scheduler remotely while no one is logged in and I fire the task, the popup is displayed. It is not displayed when the task is started by the "at system startup trigger", although history says it started succesfully.

And yes: has to be before logon.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36507008
Is the task configured to run under a service/user account explicitly?
0
 
LVL 53

Author Comment

by:McKnife
ID: 36507059
Yes, a user account. (By the way, how could you not configure a task "explicitely"? ;) There is always an explicite user, even system is a user that has a profile and all.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36507175
NM, was on a different thought process....

This is hard to track down, as you cant see the running tasks in the Task Manager when this happens to see exactly which session it is in, unless it stays running AFTER logging in as the user.

How long does the task run? Can you leave it on screen  after logon once started remotely?

0
 
LVL 53

Author Comment

by:McKnife
ID: 36507187
The task runs a second at most. What do you mean by "can you leave it on screen"?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36507192
As for the other parts of your question, might be best suited to get some scripting TAs added here... I cant help you with that part.....

There might be some WMIC commands to remotely enumerate the sessions.....

Actually....

tasklist /s remotepcname

Might shed some light once it is triggered via Startup....
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 66

Expert Comment

by:johnb6767
ID: 36507197
RE - "What do you mean by "can you leave it on screen"? "

"a message gets displayed". I had assumed that the process was resident until the message closed....
0
 
LVL 66

Accepted Solution

by:
johnb6767 earned 500 total points
ID: 36507376
I just noticed your username... Usually on this side of the threads with you.....   :-)

Basically, what I am looking for, is a method to see the Session ID/Username from the process thats launched at startup. Are you launching a script or an .exe as the task?
0
 
LVL 27

Expert Comment

by:Steve
ID: 36508881
does the message specifically have to use your program?
GPO includes facility to add a message on startup which may be worth a go.

try 'Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options' usiung 'gpedit.msc'
and look at

Interactive logon: Message text for users attempting to log on
Interactive logon: Message title for users attempting to log on

Both must be completed for this to work.

0
 
LVL 53

Author Comment

by:McKnife
ID: 36510453
@totallytonto
> does the message specifically have to use your program?
Yes, that's why I wrote "I would like to have the contents of this log displayed" ande about LegalNoticeCaption, which is exactly what you are proposing. The policy sets this very registry entry.

0
 
LVL 53

Author Closing Comment

by:McKnife
ID: 36510456
@Johnb
Problem solved. Your comment led to the idea to simply use
msg Console message
This does it.
0
 
LVL 53

Author Comment

by:McKnife
ID: 36510658
Argh...
Sometimes I hate computers... This works, but: after half a minute or so while standing at the logon screen, the message closes automatically! What could that be?
0
 
LVL 53

Author Comment

by:McKnife
ID: 36511229
Solved. There is a switch /time. Set it to /time:0 and it never closes. Otherwise, the default behavior is to close after 60s.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36511333
Glad to nudge ya.....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: I have always been a big fan of Windows but my liking towards it is slowly being eroded by the variety of other Applications that I encounter, when I browse the Web. Most of the software available is free and maybe Open Source too. …
Many times while working on a computer regardless of any Operating System, lag and crashes seem to creep in, hindering your working speed. Sometimes, it can also cause your work to be lost unexpectedly and as a result, you are unable to meet your de…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now