Tuesday, January 15, 2013

Error 1402.Could not open key: UNKNOWN\Components\XXXXXXXXXXXXXXXXXXXXXXXX

When attempting to install an msi you receive one of the following error messages: “Unable to open sub key” or “Error 1402.Could not open key:” or “Error 1402.Could not open key: UNKNOWN\Components\XXXXXXXXXXXXXXXXXXXXXXXX”

This is caused by incorrect registry permissions on the key described in the error message.   Usually the administrators group does not have access to the key. 

Of course the key UNKNOWN doesn't exist.  The key is actually here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components

Most websites will tell you to run the following script, however it doesn't seem to be able to set the permissions properly in most cases I have seen.

cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f
secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

You can fix each individual key by taking ownership, and then granding Administrators permissions to the key manually.  The problem is that there are usually a large number of problematic keys, making fixing them one by one quite tedious.

Here are instructions to give administrators full rights to the everything under the Components key and restore ownership back to the default (SYSTEM):



1. Open Regedit, and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components.
2. Right-click the "Components" key and select "Permissions".
3. Click the "Advanced" button
4. Click the "Owner" tab
5. Click "Administrators", and check "Replace owner on subcontainers and objects.
6. Click Apply. You will receive an error that "Registry Editor could not set owner on the key currently selected, or some of its subkeys.".  This is normal, the owner was usually set regardless of this message
7. Click the Permissions tab
8. Check the "Replace all child object permissions with inheritable permissions from this object" item.
9. Click Apply, then click "Yes" to confirm.
10. Click the "Owner tab".
11. Click "Other users or groups", and enter "SYSTEM".
12. Check "Replace owner on subcontainers and objects".
13. Click OK and close Regedit.



Now you can attempt to install your software again, and it should work.

Tuesday, May 8, 2012

Windows 7 Install media command prompt hotkey

Boot to Windows 7 installation media.
At the "Install Windows" screen (the first screen), hit Shift+F10.  A command prompt will appear.

Tuesday, April 3, 2012

Zenoss / Windows Server 2008 WMI

I was getting the error "Could not read the Windows event log (NT_STATUS_ACCESS_DENIED). Check your username/password settings and verify network connectivity. " repeatedly on a few Windows Server 2008 machines.

I tested from a remote machine with wbemtest and received the message "Number: 0x80070005 Facility: Win32 Description: Access is denied.".

The user I was attempting to login with was a local administrator.

The culprit? User Account Control. After disabling UAC and restarting the server, I was able to use WMI remotely. It appears that UAC was authenticating the user at a non-elevated level, causing the security issue.

The idea of UAC is nice, but the execution is ugly.

Friday, March 2, 2012

MSI Error 1723: There is a problem with this windows installer package.

MSI file installation errors out with "1723: There is a problem with this windows installer package.". If you try to launch a .vbs file, you get the error message "Can't find script engine "VBScript" for script "filename""

This is caused by an invalid file specified in the following Registry Value:
HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32\Default .

The value should, in most cases be "C:\Windows\system32\VBScript.dll"

In my case, it was set to "C:\Program Files\McAfee\VirusScan Enterprise\scriptsn.dll". Apparently this was leftover from a previously uninstalled copy of McAfee VirusScan Enterprise 8.7i, which we no longer use.

In order to edit the value, you should edit the permissions on "HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32" to give Administrators Full Control.

Thursday, January 26, 2012

Repair Missing / Incorrect Product Name in HP Desktop BIOS.

The Product Name / SKU Number / Serial Number in an HP Desktop BIOS are not available for editing by default.

While in the bios, press Ctrl+A , and then go to Security>System ID's. The missing editable fields are now available for editing.
wmic csproduct get name

Windows command line to return Model Name from BIOS. Tested with HP Desktops / Laptops successfully.

Monday, August 15, 2011

Word Frequency Generator links

I just spent 30 minutes searching the web and found these two useful word list frequency generators:

http://rainbow.arch.scriptmania.com/tools/word_counter.html

http://writewords.org.uk/word_count.asp

Thursday, January 6, 2011

Internet Explorer Homepage "Hijack"

Every new user that would log into a system with a particular image on it would have their homepage redirected to "http://ie.redirect.hp.com/svs/rdr?TYPE=3&tp=iehome&locale=en_US&c=93&bd=all&pf=cmdt" , even though the Default User Profile had the homepage set to http://www.google.com/. This was a one time thing, once the user changed the homepage it would stick.

After much trial and tribulation, I found the culprit. It is a file called "C:\Program Files\Internet Explorer\SIGNUP.ins"

At the end of the file, some HP bloatware appended the following lines:
[URL]
Home_page=http://ie.redirect.hp.com/svs/rdr?TYPE=3&tp=iehome&locale=en_US&c=93&bd=all&pf=cmdt
FirstHomePage=http://ie.redirect.hp.com/svs/rdr?TYPE=3&tp=iehome&locale=en_US&c=93&bd=all&pf=cmdt


After removing the lines, the homepage for new users was Google once again.

Friday, December 3, 2010

pyGTK issues on with Python 2.7 , GTK 2.22.0 and Windows 7

I just installed Python, pyGTK, GTK+ on this system, and wrestled with getting Python to load GTK for a couple hours.

Everytime I would open Python and type "import gtk", I would receive the following error:

Traceback (most recent call last):
File "", line 1, in
import gtk
File "C:\Python27\lib\site-packages\gtk-2.0\gtk\__init__.py", line
40, in
from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.
>>>

I could not get past this error until the following:

a) made the GTK runtime bin directory path to the first item in the PATH system variable (maybe something else like GIMP has a GTK dll that isn't compatible)

b) restarted the computer (killing and restarting explorer seems to update the path statement for the session, but not for some applications.)

Thursday, November 11, 2010

Sleep and Hibernate Greyed Out

On Windows Vista or Windows 7, Sleep and Hibernate may be disabled if you have a legacy driver installled.

You can find the offending driver by running "powercfg -Hibernate ON" from the command prompt.

I received a message like this:

The following items are preventing hibernation on this system.
There are one or more legacy drivers installed:
LMCPort



...Now I just have to figure out what to do with that legacy driver to make it work.

Friday, September 11, 2009

Zenworks Imaging with an external drive

Format the drive as ext2 (ext3 will not be readable by windows)

after booting to PXE Linux:
1. use "dmesg" to see what the external drives device name is (example: /dev/sdb)
2. mkdir /mnt/exthd
3. mount /dev/sdb1 /mnt/exthd
4. img
5. local
6. /mnt/exthd/imagename.zmg

to use the drive on a windows box if you need to extract something from the image, use the driver from http://www.fs-driver.org/ .

Wednesday, March 11, 2009

Miscellaneous Novell Tips

I had some issues with stuck obituaries in my tree and etc. and I picked up this info from Novell Support.

None of this is probably new or previously unknown, but useful nevertheless.

Delete stubborn obituaries in iMonitor:
in iMonitor when you are viewing a stuck obituary, add "&op=all" to the end of the URL and hit enter. This will enable all options for advanced management of an obituary, such as deleting it.

ConsoleOne doesn't connect to the tree:
in command line, run "consoleone.exe -forcemaster". This will force consoleone to connect to your master of root server, instead of whatever bad server it is attempting to connect to.

Friday, February 1, 2008

WSUS 3.0 Management Console Woes

After about 2 weeks of successfully running WSUS 3.0, the Management Console stopped working. Every time I tried to launch it, I would receive the following error message:

MMC could not create the snap-in. The snap-in might not have been installed correctly.
CLSID: FX:{8b6499ed-0241-e032-6508-da4b1c879d7e}

I solved the problem by renaming c:\windows\system32\mmc.exe.config to c:\windows\system32\mmc.exe.config.old .

Other things to try (None of these worked for me):
-Make sure you have MMC 3.0 and MS Report Viewer 2005 installed.
-Delete a file called "wsus" C:\Documents and Settings\chief\Application Data\Microsoft\MMC
-Last Resort: uninstall/reinstall WSUS 3.0


Sunday, September 2, 2007

Moving a groupwise 7.x GWDOMAIN folder

When I migrated our Groupwise server to a new machine, I decided to change around some of the volumes.

In this example, I moved GWDOMAIN from BORDER\SYS:\ to BORDER\Groupwise:\

First I shut down all groupwise agents/NLMs on the server. Then I made the config changes and brought groupwise up like normal.

Here are all of the configurations I had to change to make the move work:

gwia.cfg
from
/Home-\\border\sys\gwdomain\wpgate\GWIA
to
/Home-\\border\groupwise\gwdomain\wpgate\GWIA

domain.mta
from
/home-\\BORDER\sys\gwdomain
to
/home-\\BORDER\groupwise\gwdomain

webac70a.waa
from
/ph=\\Border\sys\GWDOMAIN\WPGATE\WEBAC70A
to
/ph=\\Border\groupwise\GWDOMAIN\WPGATE\WEBAC70A


gmtacfg.ini
from
BackLink=\\BORDER\sys\gwdomain\GWAVA\config
to
BackLink=\\BORDER\groupwise\gwdomain\GWAVA\config

ConsoleOne
GWIA-
"Server Directories" Tab had to be modified

Domain Object Properties- UNC Path:
from
\\BORDER\sys\gwdomain
to
\\BORDER\groupwise\gwdomain

GWAVA 3.x:
edit thie file: gwdomain/gwava/config/gmtacfg.ini
The following lines had to be modified:
Home=\\BORDER\groupwise\gwdomain
MTASieveBase=\\BORDER\groupwise\gwdomain\GWAVA
ProgramBase=\\BORDER\sys\SYSTEM
ArchiveDirectoryPath=\\BORDER\groupwise\gwdomain\GWAVA\archive
POQueuePath=\\BORDER\groupwise\gwdomain\GWAVA\config\poq

Thursday, June 28, 2007

MSIZAP - Windows Installer CleanUp Utility

After upgrading my network to ZFD 7.01 Hot Patch 5, I had a corrupted install of Zenworks for Desktop Agent on a machine that I couldnt upgrade or uninstall. I kept receiving the error -1722 "there is a problem with this windows installer package"

Eventually came across TID 10088429, which explains that this is simply inevitable on some machines when upgrading to ZFDAgent 7.0.1.4 (which is the latest version in Hot Patch 5). They reccommend using MSIZAP to blow away the msi info and let you install a new one without any problems.

I have to say that I am in love with MSIZAP aka Windows Installer CleanUp Utility, an invaluable little tool for dealing with naughty MSI's.

here is the KB Article on MSIZAP: http://support.microsoft.com/kb/290301

Friday, June 22, 2007

Rebuilding a Zenworks Server

If you have to blow away your zenworks for desktops server, make sure you delete the eDirectory objects before you install your new server, or it may not work properly.

Some of the eDirectory Objects include (using servername "zen" as an example):
ZEN-ZIS (Imaging Server object)
WOL Service_ZEN (wake on lan service)
Desktop Management Database_ZEN
Inventory Database_ZEN
Inventory Service_ZEN

*There are many other objects that should be deleted, but are not zenworks related so I will not be listing them here. there may be other zenworks objects as well, this is just for ZFD (Zen for desktops) as that is all I am running.


Background:
After a lengthy and unsuccessfuly repair process on my crashed zenworks server I decided to blow away the server and rebuild it since there wasn't any user data other than my workstation images (Bad VCU! Bad VCU! ...I wont go into this here...). After rebuilding the server, Zenworks Imaging would not work. I could take/restore an image manually, but automatic imaging attempts would return "no work to do" and never take the image. In the server logs I had the following error in the image server log (sys:system\zimglog.xml):

Status> Failure
ErrorMessage> Undefined error message
Timestamp> Fri Jun 22 14:03:36 2007

After pulling my hair out because of the "undefined error message" I decided to check the tree for any zen objects, delete them, and reinstall zenworks. After doing this, automatic imaging started working instantaneously. Specifically, the old ZEN-ZIS object was causing the problem.



Lesson of the Day: Delete server objects in eDirectory after blowing away a server, but before installing a new server of the same name.

Mission Statement

I've decided to make my own contibution the sea of internet blogs out there. The purpose of this is to blog Tech related information in my experience as a Network Administrator for two different companies. One public and one private sector... one Novell eDirectory network, and one Microsoft Active Directory network.

The main purpose of this blog will be to document caveats and not-so-well known fixes and processes that I have found to be extremely useful in my day-to-day tech life. I cannot count how many times I have found a forum post or a random blog with the answer to my unique problem, after hours and hours of searching. Hopefully this blog will randomly help someone out in the future (likely by a cached google search result as I so often use). I will not be restricting this blog to those specifics, however, I will allow the blog entries to wander a bit.