Windows 8 Start Menu
At //BUILD/ some people are asking if it is possible to get the normal start menu back, and yes it is follow these instruction:
NOTE: This is a hack and will break stuff.
- Launch Regedit
- Navigate to \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
- Change RPEnabled from 1 to 0
- Log out
//BUILD/ day -1
So it’s Monday the conference starts tomorrow and I’m super stoked, to burn some time we went to the Citadel outlet doing some shopping and Starbucks coffee drinking.
In the evening we where invited to the Microsoft Sweden meet up. It was a fun event, and everyone got matching jackets so all swedes can be singled out
//BUILD/ day -2
Todays prebuild theme is jetlag, we have a lovely –9 hours time different from Sweden
So we are spending the day at a shopping mall (a.ka Starbucks checking emails and twitter)
Catching the Close button event
Got a question yesterday how to get an event when a user clicks the close button in a console app. This code snippet is what I have used.
class Application { static Application() { SetConsoleCtrlHandler(Handler, true); } public static event Action Close; public static event Action Break; public static event Action CtrlC; public static event Action LogOff; public static event Action Shutdown; [DllImport("Kernel32")] private static extern bool SetConsoleCtrlHandler(HandlerRoutine handler, bool add); private delegate bool HandlerRoutine(CtrlTypes CtrlType); private enum CtrlTypes { CTRL_C_EVENT = 0, CTRL_BREAK_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT = 5, CTRL_SHUTDOWN_EVENT } private static bool Handler(CtrlTypes ctrlType) { switch (ctrlType) { case CtrlTypes.CTRL_C_EVENT: if (CtrlC != null) CtrlC(); break; case CtrlTypes.CTRL_BREAK_EVENT: if (Break != null) Break(); break; case CtrlTypes.CTRL_CLOSE_EVENT: if (Close != null) Close(); break; case CtrlTypes.CTRL_LOGOFF_EVENT: if (LogOff != null) LogOff(); break; case CtrlTypes.CTRL_SHUTDOWN_EVENT: if (Shutdown != null) Shutdown(); break; default: throw new ArgumentOutOfRangeException("ctrlType"); } return true; } }
And it’s used as follows.
static void Main() { Application.Close += () => { Debugger.Break(); }; Console.ReadKey(); }
Close database connections from TSQL
I always forget how to do this so I thought someone else probably have the same issue ![]()
alter database DatabaseName set single_user with rollback immediate go
GodModes in Windows 7
GodMode is a undocumented feature in Windows 7 that gives you direct access to all kind of different settings in windows. The most popular is the folder view of all available commands in the Control Panel. To get access to this you need to do the following.
- Create a new folder
- Name the folder: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
Now when you open the folder you will get the following folder view:
Bellow is a list of other direct access folders that you can create as the one above.
- ControlPanel.{ED7BA470-8E54-465E-825C-99712043E01C}
- LocationSensor.{00C6D95F-329C-409a-81D7-C46C66EA7F33}
- BiometricDevice.{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
- PowerOptions.{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
- TaskbarIcons.{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
- Credentials.{1206F5F1-0569-412C-8FEC-3204630DFB70}
- InstallFromNetwork.{15eae92e-f17a-4431-9f28-805e482dafd4}
- DefaultPrograms.{17cd9488-1228-4b2f-88ce-4298e93e0966}
- PublicKeys.{1D2680C9-0E2A-469d-B787-065558BC7D43}
- WifiNetworks.{1FA9085F-25A2-489B-85D4-86326EEDCD87}
- Network.{208D2C60-3AEA-1069-A2D7-08002B30309D}
- Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
- Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}
- WorkplaceConnetions.{241D7C96-F8BF-4F85-B01F-E2B043341A4B}
- Firewall.{4026492F-2F69-46B8-B9BF-5654FC07E423}
- PerformanceRatings.{78F3955E-3B90-4184-BD14-5397C15F1EFC}









