Black screen w/ movable cursor after login when .NET app executed from RunOnce key
Hello all, I believe that I might have identified a bug in Windows 7 Enterprise. As part of a software deployment, I wrote a .NET 3.5 app in C# which needs to run upon the next bootup. I had the path to the app added to the HKLM\Software\Microsoft\Current Version\RunOnce key. When the machine boots up & I log in, I receive a black screen with only a mouse cursor. Eventually, the desktop & system taskbar do appear. Upon further investigation, I realized that the black screen persists until my .NET app terminates. As a test, to eliminate the possibility of an issue with my app causing this problem, I wrote another tiny C# app which should be completely benign: using System; using System.Collections.Generic; using System.Threading; using System.IO; using System.Windows.Forms; namespace TestRunOnce { class Program { static void Main(string[] args) { Thread.Sleep(120000); MessageBox.Show("Done"); } } } Sure enough, when I compiled this and pointed to it in the RunOnce key, I still got the black screen. As soon as I click [OK] to the "Done" message box, my desktop appears. Has anyone else out there run into this before? Is this a known bug?
May 11th, 2011 11:59am

Hi, As far as I know, this is normal behavior. A number of registry entries which will cause programs to run at startup and the various methods have a defined sequence of operation. In the case of runOnce all entries in that key have to finish before other keys for startup programs are executed. This is what is required usually for typical use of the key - setup programs. In addition, regarding the development issue about .NET 3.5 app, I suggest contacting MSDN forum. MSDN Forum http://social.msdn.microsoft.com/Forums/en/winforms/threads Best Regards, Niki Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2011 5:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics