Download DB2 Upgrade DB2

Update Symantec without the “uninstall password”

December 9th, 2008 by Leons Petrazickis

I had to update an old XP Home test machine to run the latest Symantec Suite of Crap. Installation of new Symantec stuff requires a manual uninstall of old Symantec stuff. Here, I ran into a problem — it prompted for an “uninstall password”.

The default password is “symantec”, but that wasn’t my issue.

Apparently, whenever an old version of the Symantec corporate authentication server is taken offline, the automatic uninstall password process verification is broken, and it keeps prompting indefinitely.

Open the registry editor (Start > Run > regedit) and navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\Administrator Only\Security\UseVPUninstallPassword

Set it to 0. It will now not prompt for a password when uninstalling.

Also look at this.

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\Administrator Only\Security\LockUnloadServices

Set it to 0 too. You’ll now be able to unload the service.

Do a Start > Run > services.msc

Scroll down to Symantec Antivirus, go into Properties > Recovery, and disable automatic reload.

Now right-click to stop SavRoam and all the other Symantec services.

You can now uninstall Symantec AntiVirus from the Add/Remove Programs control panel.

Restart the computer. This resumes some necessary services.

You can now install the updated Symantec product.

Useful tools

References

Posted in windows | No Comments »

Creating Start Menu Shortcuts with Javascript

August 14th, 2007 by Leons Petrazickis

While preparing the installer for the Web 2.0 Starter Toolkit for IBM DB2, I had to set up Start Menu shortcuts. The way to do that is to work through the Windows Scripting Host (WSH).

The WSH supports two built-in languages – VBScript and Jscript – and a theoretical number of third-party alternatives. VBScript is the better documented of the two in terms of examples, but I find its syntax ugly and constrained. Fortunately, Jscript can do anything VBScript can.

So here’s how we can create Start Menu shortcuts with Javascript.

Locate the Start Menu Programs folder

Most interesting Windows folders can be found by working with special folders

var shell = new ActiveXObject("WScript.Shell");
var startmenu = shell.SpecialFolders("Programs");
 

The shell object will be reused in code below, but you can redeclare it every time if you like.

Create a Folder

Scripting Guy has more details

var folder = "My App";
var group = startmenu + "\\" + name;

var fso = new ActiveXObject("Scripting.FileSystemObject");
if (!fso.FolderExists(folder)) fso.CreateFolder(folder);
 

startmenu is defined above.

Create an LNK Shortcut

The very hidden file extension of standard Windows shortcuts is LNK. This distinguishes them from website shortcuts, which have the equally hidden extension of URL.

If you are interested in something closer to the symbolic links of Unix, the NTFS equivalent is called junctions. You may find Junction Link Magic of interest.

var name = "My Shortcut";
var file = "myfile.txt";
var path = "C:\\Program Files";

var shortcut = shell.CreateShortcut(group + "\\" + name + ".lnk");
shortcut.TargetPath = path + "\\" + file;
shortcut.WorkingDirectory = path;
shortcut.Save();
 

See the full list of properties. I recommend always setting the working directory for application links. If you don’t, your program won’t be able to load resources from it’s installation folder.

shell and group are defined above.

Create a URL Shortcut

This is very similar. The main difference is that you set the extension to URL.

var name2 = "My Other Shortcut";
var address = "http://example.org/";

var shortcut = shell.CreateShortcut(group + "\\" + name2 +".url");
shortcut.TargetPath = address;
shortcut.Save();
 

See the full list of properties.

shell and group are defined above.

Locate Program Files

When creating shortcuts, it is often useful to know where a user’s Program Files directory is located. It is called different things in different versions of Windows, and some advanced users like to move it or rename it.

var REG_PF = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ProgramFilesDir";

var progFiles = null;
var process = shell.Environment("PROCESS");
if (process)
        progFiles = process("ProgramFiles");
if (!progFiles)
        progFiles = shell.RegRead(REG_PF);
 

shell is defined in the first code excerpt.

Posted in javascript, windows | No Comments »