Friday, December 15, 2006

Fluke DTX 1200 & DTX 1800 not on Vista

I was trying to download some test results from a Fluke DTX 1200 and 1800 yesterday but discovered that the Fluke USB drivers do not work on Vista.

Fluke tech support have no idea when drivers will be available.

In addition the help system in LinkWare 2.6 is based on WinHlp32.exe and this is not available in Vista so you cannot view the help file.

Tuesday, December 12, 2006

Create .lnk file in C#

Here is some C# code to create a shortcut to a folder. These are actually .lnk files which are handled in a special way by Windows Explorer.

First include a reference to C:\Windows\System32\wshom.ocx

Second, include the following using statement :-

using IWshRuntimeLibrary;

Third, Here is the code :-


// This creates a Folder Shortcut

IWshShell wsh = new WshShellClass();
IWshShortcut shortcut = (IWshShortcut) wsh.CreateShortcut (shortcutpathfilename);

shortcut.TargetPath = targetdir;

shortcut.Save();

shortcutpathfilename is a path & filename of the .lnk file.

targetdir is the directory the link points to.