Sunday, 29 July 2007

Find the PC that a certain user is logged on to

Locate a user - Find PCname by username

As an IT guy (or girl) nowadays there is a lot of things you can do to help users with their computer problems remotely. You can take over their PC, you can install software, check and adjust certain parameters, all from a distance. The one thing that remains difficult is to find out the name of the PC that the user is currently working on. ("Fritz" is not an unusual answer when you ask users for the name of their computer.)

Provided the username, this script uses the command "nbtstat -c" in combination with a "net send" to find out the computername of the remote PC. Several vbs and DOS batch scripts exist
already to this end.

This vbs script is more, it is a dashboard. It provides buttons for
  • taking over the user's PC (using remote assistance or remote desktop)
  • listing installed printers
  • showing mapped Network drives ...
You can easily add buttons for tasks that you routinely do on remote PCs . I will give you more examples in some upcoming blogs (deleting temp files, finding out the pst folder location, launch a silent installation of software on a remote PC, etc.)
I have used this script for several years, and I has proven very useful.
Enjoy, and tell me how it works for you!

Wednesday, 4 July 2007

Windows hotkeys and vbs

RSS is a modern abbreviation with many possible meanings. One is "real simple syndication" which probably brings my blogs to you, another one is "repetitive strain syndrome" which I am going to fight with today's blog. I am encouraging you to use your keyboard rather than your mouse!
Windows has a cool feature that can save us a lot of time. I am talking about Windows shortcut keys. I don't want to go into the details, a lot has been written about it already (e.g. here; a little warning).
I'd rather like to explore how you can use it in combination with vbs scripts. Say, you want to see your Outlook contacts every time you press the key combination Ctrl+Alt+C.
You also want it to open the Find box, so that you can start typing the name of the person whose phone number you want to look up. Here is how I do it:
I have a vbs script that does all of the above. Now I need to assign the key combination Ctrl+Alt+C to that script.
1. Place the script in My Documents/Productivity scripts (or any folder you like).
2. Create a folder "Hotkey shortcuts" in either of the following locations:
  • your desktop
  • your "programs" folder
  • your taskbar
(it won't work in any other location)
3. Create a shortcut to your script and place it in the folder "Hotkey shortcuts".
4. Rename the shortcut (remove the part "shortcut to").
5. Right click on the shortcut, choose "Properties" and go to the tab "shortcut". Place the cursor in the field "Shortcut key" and simultaneously press Ctrl+Alt+C. Press OK.

VoilĂ  le travail.

You might want to read my other articles on Windows custom hotkeys
  • Repair a bug that comes with Windows custom shortcut keys.
  • list all your custom Windows shortcut keys.

Monday, 2 July 2007

Export/Import MS Word Outlines from and to Shadowplan - fast

Here's one for all Shadowplan users.
The macro "ExportShadowXML" exports an Outline, that you have created in MS Word, to a Shadowplan xml file.
From there it will immediately be uploaded to your Palm/Treo/??.
It's substantially faster than the one from vjornes, because it doesn't use
The macro "ImportShadowXML" imports a ShadowPlan file to MS Word.
See also my article on using MS Word as an Outliner.

Using MS Word as an outliner

You don't need OneNote, Omni Outliner, Ecco outliner or any other outliner software. You already have the outliner and note taking tool you need - MS Word. Discover it. Download an open-source outliner template for Word to add the functionalities that Word lacks.
Diesen Artikel gibt's auch auf Deutsch

What is an Outliner?
To me it's a Text Editor that allows you to organize ideas in a tree structure. You can use Notepad to create outlines: simply write up the main ideas, one on each line. If you have additional information for one main idea, then insert a new line beneath, press tab to indent the text in this line, and write up the sub-idea. And so forth. The picture shows an example.
Not all ideas can be organized in a tree structure, but you will be astonished how often it works, once you get warmed up.
At times, you might want to hide all the sub ideas and only see the main ideas. You cannot do that in Notepad, but you can do it in Word (I'll describe later how to do that).
When and idea belongs to more than one main idea, then you should organize the information in a table. That's the good thing about Word - you can insert tables in your outline, and you already know how to do it.
Computer scientists use a different variant of outlines to have computer systems communicate with each other, they use XML files. The rss feed of my blog is one example. If you open an xml file in Internet Explorer it will get displayed as an outline. So outlines are quite a modern concept.
A special case of outlines are mindmaps. When the whole Mind Mapping wave broke loose I was one of the first on board. I created lots of mindmaps until I realized that a PC screen was always too small for my mindmaps, let alone the screen of my Palm. That's when I became interested in outlines - the little brother of mindmaps. There are lots of special programs out there, but the easiest one is to use MS Word. (How to use Word's outline view - check this or this).
There are only some disadvantages:
  • The font sizes decrease rapidly the more you indent an item.
  • There is no feature to collapse or expand all items at once
To amend these drawbacks I created this template. I have adapted the font sizes of the styles "Heading 1", "Heading 2" etc. so that the Outline looks nice. It also contains macros for collapse and expand.

I've already placed some example items in the template as an illustration.

Use the following keys:
TAB to demote an item
SHIFT TAB to promote an item
+ to expand an item
- to collapse an item
These key functions are already "built in" in MS Word.

The template recognizes the following additional key combinations (those are macros I added):
CTRL + to expand all items one more level
CTRL SHIFT + to expand all completely
CTRL - to collapse all one more level
CTRL SHIFT + to collapse all items completely

You can assign other key combinations to these macros if you want to:

  • In Word go to Tools/Customize
  • Press the "Keyboard" button
  • Under "Categories" choose "Macros"
  • Under "Macros" choose the "CollapseAll" Macro
  • Place the cursor in the field "Press new shortcut key"
  • Simultaneously press the keys Ctrl, Shift and - (Minus)
  • Press the "Assign" button

From now on, whenever you press the key combination Ctrl, Shift and -, the CollapseAll Macro will be called.

If you use the "Getting Things Done" methodology, then there's a little extra for you: the macro called "List Next Actions" extracts all subitems of items called "Next Actions". They are displayed in a Internet Explorer window, with buttons that allow you to create an Outlook appointment or task immediately.

For those who can't download Word templates here's the source code for the
Word Macros.