Enable Microsoft Update

Once annoyance I have always had with Windows is that once I run Office (or something else) and I say “NO!” to enabling updates for it, there’s never seemed to be a simple way of getting back to enable those updates.  You Google around for it and find a lot of posts saying “goto http://update.microsoft.com/microsoftupdate and follow the directions” but it never works for me.

I found this today, used it on two servers to enable updates for Report Viewer, SQL Server, Microsoft Access Database something or other horse shit, and some other Microsoft stuff.

Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager")
ServiceManager.ClientApplicationID = "My App"

‘add the Microsoft Update Service, GUID
Set NewUpdateService = ServiceManager.AddService2(“7971f918-a847-4430-9279-4a52d1efe18d”,7,””)

It’s vbscript (obviously) and I found it here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa826676%28v=vs.85%29.aspx


FOG: Overview

I love FOG.  My current employer is the third company that I’ve implemented it for.  FOG is an open source computer cloning and application / printer management solution.  FOG literally stands for Free OpenSource Ghost.  I never ever post about anything, so I think I’ll do some posts about FOG.

FOG is available at http://fogproject.org/.

FOG forums are available at http://fogproject.org/forum/.

Current version is 0.32, but 0.33 is available as a release candidate.

Didn’t think this one through…

If you’re running a Windows based DHCP server, make sure you add an exclusion in your AV software for c:\windows\system32\dhcp, otherwise you’re going to have a bad time. Potentially anyways.

Old school trick to reset admin password (copy/paste from reddit)

You just need a Win7 disc:

  • Boot to Win7 disc.
  • Choose “Repair your computer”
  • Open DOS
  • Navigate to C: (or wherever Windows is installed)
  • Type: copy c:\windows\system32\sethc.exe c:
  • Then type: copy /y c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe

Then reboot the machine. When the login screen pops up, hit SHIFT 5 times and you’ll get a command prompt. Then type:

  • net user administrator (password)

Obviously, without the parenthesis. Then you can close the DOS prompt and login with the password you just set. If the local admin account is disabled, type:

  • net user administrator /active:yes

This is a really old trick, but is really useful if you’re in a pinch. Where I work, it’s necessary to replace the sticky keys feature, so that’s why you copied it to the C: drive in the first step. You can follow the other steps and just replace it when you’re done.

Delay on boot, dmesg shows i915 driver attached, reenabling gpu turbo

Google shows a plethora of causes and solutions for this (https://www.google.com/search?q=i915+driver+attached%2C+reenabling+gpu+turbo+boot+delay)

For me, I just needed to do a BIOS update.

Disable DHCP for wired connection on boot

I have a Dell Latitude E5410 that I use exclusively from the couch, only on wireless.  Therefore, waiting ten seconds for it to decide that it couldn’t get a DHCP lease for the wired connection on boot was a silly waste of time.

It’s easily solved:

sudo chmod -x /etc/rc.d/rc.inet1

Yeah.  Easy, right?

I’m on Slackware, so I suppose YMMV.

Cannot use CBT: Soap fault. Error caused by file [path/to/file]

I’ve found that sometimes a VM crashing, storage being powered down before VMs are, or an ESX host issue can cause Change Block Tracking to stop working properly.  According to Veeam KB article 1113, the solution to this is to reset CBT by:

  1. Powering down the VM in question
  2. Head into the settings for the VM, click the Options tab, head down to General (under Advanced) and select the Configuration Parameters button.
  3. Set ctkEnabled to false
  4. Set scsi0:x:ctkEnabled to false for each disk for the VM
  5. Remove any files ending in -CTK.VMDK in the source folder, either via SSH (or emergency mode or whatever they call it) or through the datastore browser
  6. Power on the VM
  7. Power the VM off (updates the CTK table)
  8. Power the VM back on.
  9. Rerun your Veeam backup to renable CBT


However, this is a production server that has thousands of active connections at any time, so this kind of sucks.

Fatal error during installation. (Error installing driver “klim”. It is recommended to restart your computer.)

Rolled out Kaspersky to several hundred workstations over the past few weeks, and was getting the error “Fatal error during installation. (Error installing driver “klim”. It is recommended to restart your computer.)” on several administrative machines.  After the third or fourth one, I noticed that they were users that had things like Cisco VPN Client and remembered that Windows 7 only allows for so many network filters.  A quick google search for the proper registry key and I was back in business.


The key you want is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\MaxNumFilters and the max value for that is 14 (default was 8 if I recall).

Avaya Escape Codes

I found myself in a snag this morning and these helped immensely. It was quite a task finding these online, so I thought I had better repost them. I found a link to a site from a forum that was supposed to have these listed, but the site no longer existed. I was able to retrieve the content, however, with the help of the Wayback Machine. The original site was http://www.jaymzworld.com/pages/sat.shtml (wayback machine link).



In the latest release of Avaya Communication Manager the following terminal types are supported: att513 (default), att4410, att4425, 715, W2KTT (windows 2000 terminal), SUNT (SUN terminal), NTT (windows NT terminal), and VT220. It also supports the normally noninteractive ossi interface which is used by the Avaya Site Administration application for batch changes to the system.


Command F Key 513 4410/4425 vt220 w2ktt sunt
Cancel F1 ESC Ow ESC OP ESC [3~ ESC x ESC [11~
Refresh F2 ESC Na ESC OQ ESC [34~ ESC r ESC [12~
Enter F3 ESC SB ESC OR ESC [29~ ESC e ESC [13~
Clear Field F4 ESC [J ESC OS ESC [33~ ESC c ESC [14~
Help F5 ESC Om ESC OT ESC [28~ ESC h ESC [15~
Go To Page F6 ESC Or ESC dp
Next Page F7 ESC [U ESC OV ESC [6~ ESC n ESC [18~
Previous Page F8 ESC [V ESC OW ESC [5~ ESC p ESC [19~


Terminal emulation programs

All configurations below are for att4410 / att4425 emulation.

Microsoft Windows® based applications


SSH Secure Shell for Windows workstations is a commercial product that can be used to provide vt100 type emulation to a host over a secure connection. Its configuration file is called keymap22.map. Changes to this file can be globalized by altering the copy located at C:\Program Files\SSH Communications Security\SSH Secure Shell, or can be done on a per user basis by editing the user copy at C:\Documents and Settings\username\Application Data\SSH. The following entries should be edited:

 	TH_F1 = "\033OP"
 	TH_F2 = "\033OQ"
 	TH_F3 = "\033OR"
 	TH_F4 = "\033OS"
 	TH_F5 = "\033OT"
 	TH_F6 = "\033Or"
 	TH_F7 = "\033OV"
 	TH_F8 = "\033OW"

Tera Term

Tera Term is a free software terminal emulator for Windows. It can act as a replacement for HyperTerminal and can use telnet and ssh for transport. The default keyboard setup stored in the file KEYBOARD.CNF is almost compatible with VT terminal keyboard. You can modify key assignments by editing the file. See the included documentation keycode.txt for detailed instructions on changing mappings.


[VT function keys]
;F6 key
;F7 key
;F8 key
[VT function keys]
;F6 key
;F7 key
;F8 key

[User keys]

X Window System emulators


The xterm program is the standard terminal emulator for the X Window System. Changes to xterm’s keyboard mapping are accomplished on a per user basis in the file ~/.Xdefaults, located in the user’s home directory. For SunOS users, the standard terminal is normally dtterm, which can also be altered using the ~/.Xdefaults file.

Note: Some distributions, such as Fedora, no longer use settings in the .Xdefaults file. Rather, changes should go into the user’s .Xresources file.

Settings for xterm:

*VT100.BctLabel1: :    F1       F2       F3      F4        F5       F6       F7 F8        F9      SF1      SF2      SF3
*VT100.BctLabel2: :  PrevPg   PrvFld   NxtFld   NxtPg    Submit   BacTab Cancel   Help     NxtFrm   Refrsh   ClrFld   Update
*VT100.Translations: #override\
 ~Shift <Key>F1:        string("\033OP") \n\
 ~Shift <Key>F2:        string("\033OQ") \n\
 ~Shift <Key>F3:        string("\033OR") \n\
 ~Shift <Key>F4:        string("\033OS") \n\
 ~Shift <Key>F5:        string("\033OT") \n\
 ~Shift <Key>F6:        string("\033Or") \n\
 ~Shift <Key>F7:        string("\033OV") \n\
 ~Shift <Key>F8:        string("\033OW") \n\

Settings for dtterm. Note that F9 is substituted for F1.

*dtTerm*Translations: #override\
~Shift <Key>F9:         string("\033OP") \n\
 ~Shift <Key>F2:        string("\033OQ") \n\
 ~Shift <Key>F3:        string("\033OR") \n\
 ~Shift <Key>F4:        string("\033OS") \n\
 ~Shift <Key>F5:        string("\033OT") \n\
 ~Shift <Key>F6:        string("\033Or") \n\
 ~Shift <Key>F7:        string("\033OV") \n\
 ~Shift <Key>F8:        string("\033OW") \n\ 
 ~Shift <Key>Help:      string("\033OP") \n

For more info, see the page covering the .Xdefaults file.


Eterm is a vt102 terminal emulator intended as a replacement for xterm. Its’ modification file is located in the user’s home directory at .Eterm/user.cfg.

begin actions
        bind 0xffbe to echo '\033OP'
        bind 0xffbf to echo '\033OQ'
        bind 0xffc0 to echo '\033OR'
        bind 0xffc1 to echo '\033OS'
        bind 0xffc2 to echo '\033OT'
        bind 0xffc3 to echo '\033Or'
        bind 0xffc4 to echo '\033OV'
        bind 0xffc5 to echo '\033OW'
end actions