Dan Rigsby – Coding Up Style

Developer.Speaker.Blogger

Archive for the 'Windows' Category

What’s on your Desktop?

Posted by Dan Rigsby on 14th December 2008

My friend Jeff Blankenburg asked the question, “What’s In your quick launch bar?”.  I have been planning on making a post similar to this for a while.  Recently, I have reinstalled windows on all 4 of my primary machines (work PC, laptop, and 2 home PCs), and I have been trying to keep the settings the same across each of them so that I feel “at home”.  Part of this is using Live Mesh to synchronize my folders, but it also includes keeping the desktop and installed programs very similar. I thought I would share with everyone how I configure my desktop.

iconsDesktop

My desktop background is always solid black.  I don’t like having a picture in the background distracting me, I like the simplicity, and black is very Remote Desktop friendly.

I tend to place items that I am currently working on on the desktop, but I remove them when I am done.  For instance, if I download software or grab an image, I place it on the desktop first. However,there are 4 icons that always remain. These are:

  • User Files: I store everything in here and keep most of it in sync with Live Mesh
  • Computer
  • Recycle Bin
  • Visual Studio 2008

I could easily add more icons, however I prefer to just hit the “Windows Key” and type in the name of the program I want to open.  I guess I just prefer simplicity and neatness above all.

Sidebar

12-14-2008 9-51-08 AM As with my desktop, I don’t like a lot of clutter in my sidebar.  I want to keep it down to useful and non-redundant gadgets.  So, I am not going to have a calendar or clock in the sidebar, since those show up in my taskbar.  And I am not going to have something like a calculator in there which I rarely use. The gadgets I currently have are:

  • Multi Meter
  • Weather Bug: Everyone loves to talk about the weather.
  • Stock Ticker: I don’t know why I bother to constantly keep myself depressed, but I do follow the stock market.
  • Remote Desktop: I need to remote desktop into machine frequently.  With this gadget I just type in the machines name.  I don’t have to open a program first.

On my laptop I also have the Wireless Network Meter gadget installed, but I rarely have it displayed.

Quick Launch

 12-13-2008 11-19-48 PM

I keep a maximum of 10 items in my quick launch bar. This isn’t so much to save space, but because of the “Windows Key” + [Number] shortcuts.  Having these remain the same from machine to machine means that I always know what my shortcut keys are to some of my most used programs.  For instance, I know that “Windows Key” + 2 is always my Visual Studio Command Prompt, etc  The 10 items I use are:

quicklaunch2

  1. Show desktop
  2. Visual Studio 2008 Command Prompt: I need a command prompt all the time, and the Visual Studio one automatically sets up all of the shortcuts needed for development.
  3. Internet Explorer 8: This is my primary browser.
  4. EditPlus: My alternative to notepad.
  5. Visual Studio: My favorite piece of software.
  6. Live Writer: I use this to author all of my blog posts.
  7. Zune: My primary media player.
  8. Paint.Net: I still edit a lot of images.  While I use Live Photo Gallery for viewing image and SnagIt for capturing images, I prefer Paint.Net for raw image editing.
  9. VPN Client: I need this to connect to my work network.
  10. SQL Server Management Studio: I deal a lot with databases.  I like to have a separate version of Management Studio open for each database I connect to.  This helps prevent me accidently making changes to the wrong database.

Startup Programs

12-13-2008 6-02-54 PM

  • Sync Center
  • Oovoo: I love this program for performing high quality video with my friends and family.
  • Power Options: On a laptop, I find myself changing options a lot.  Power Options also offers a context menu shortcut to “Windows Mobility Center” which has the ever important “Presentation Mode” that I use at every speaking engagement.
  • Live Messenger: This is my primary IM client.  I also like how it alerts me when I get a new hotmail message since that is my primary email account.
  • Live Mesh: This is how I keep files on all of my machines in sync!
  • Networking
  • Windows Sidebar Control
  • SnagIt: I need to capture screenshots all the time: sometimes for blogging, sometimes for work.
  • Volume Control

These programs very just a bit depending on if it is on my laptop or not.  I don’t keep up Power Options or Sync Center on a desktop machine.

I also routinely start up Windows Live Mail as it has quickly become my default email/contacts/calendar program.  I have fallen in love with Live Photo Gallery too for working with my family pictures.

 

So what does your desktop or quick launch bar look like?  Anything worth sharing?

DotNetKicks Image

Posted in Personal, Windows | 5 Comments »

Remotely Log Off Remote Desktop Users

Posted by Dan Rigsby on 26th August 2008

I frequently use Remote Desktop to access various PCs here at work and nothing annoys me more than seeing this message box:

RemoteDesktopExceeed

This is caused when “The terminal server has exceeded the maximum number of allowed connections.”, right?  Basically, this happens because Windows by default only allows two simultaneous terminal services connections to the same machine.  If you see this message, then there is already that number of people logged in, and you cannot connect until one of the sessions logs off.

Usually what happens is that people don’t explicitly log out of machines when they disconnect from remote desktop which causes their “rogue” sessions to remain active.  You could just nicely ask everyone if they would please “log off” before disconnecting their sessions, but is there something else we can do?

To perform the commands I am about to show you, you need to be an administrator on the target machine.  If you aren’t you can’t perform these commands.  However, in most development and test environments, hopefully this won’t be an issue.

How to query for users on a machine

First, how can we query to find out what users have a session on a remote machine?  Windows provides the qwinsta.exe command which we can use to query for the sessions that are running  The format is as follows:

qwinsta /server:<serverName>
 

Here is an example running this command against one of my local machines.  Notice it shows the username, state, and the ID of the session.

cmd3

You can also use quser.exe:

quser /server:<serverName>
 
Here is the same example above but notice it also when they logged in and how long they were idle.

cmd1

How to log a user off of a machine

Now that we know what users are on a machine, how can we force one to disconnect? Again, there is a handy little command called logoff.exe that we can use to force a user to log off of a machine based off of their session ID.  The format is as follows:

logoff <sessionId> /server:<serverName>
 

Here is an example running this command against one of my local machines.  Notice that I used the session ID that I found from the quser.exe command above.

cmd2

Warning: If you remotely log off a user, their log session goes away which could mean that the unsaved data is lost, or if the user is in the middle of an activity, they may come down to your office to chew you out.

kick it on DotNetKicks.com

Posted in Tips, Windows | 15 Comments »