"This advertised application will not be installed because it might be unsafe. Contact your administrator …"

May 12th, 2012 No comments

This advertised application will not be installed because it might be unsafe.  Contact your administrator to change the installation user interface option of the package to basic.

Since I am my administrator …  I had to look into why AweSync was not installing on my freshly reimaged work Windows 7 PC.  I’d double click on the installer and it produced the error captured above:
”This advertised application will not be installed because it might be unsafe.  Contact your administrator to change the installation user interface option of the package to basic.”

I consider AweSync a trusted application, and certainly not unsafe.  So a digging we go.  Google wasn’t useful so I ran the install with the following command line:
   msiexec /i "awesync.4.14.0.msi" /lv c:\data\awesync.log
to get a installation log file.

Looking at the log file, the culprit was “ERRCA_UIANDADVERTISED”.  For reasons unknown, the default install settings for AweSync was preventing it from detecting Lotus Notes.  I don’t know why AweSync wasn’t actually installing but I expect that there was some old HKEY Current User registry information hanging around.  Remember how I said I had reimaged my PC?

Running the AweSync with the basic interface option seemed to fix the problem:
   msiexec /i "awesync.4.14.0.msi" /qb /lv c:\data\awesynca2.log

Update:
Since fixing the problem, the best explanation I’ve seen for why running the install with the basic interface option is this:

Running an installer with the basic user interface mode performs only the actions contained in the installer’s Execute sequence and bypasses the error noted above in most cases.
- Soumitra Mondal’s WebLog

I missed the Windows XP release birthday

May 10th, 2012 No comments

I’ve been working on Windows XP for a long time.  I found an old blog post with the Windows XP release dates in it:

30/06/2000 – Whistler Technical Beta begins

25/10/2001 – Windows XP Released
06/06/2002 – Windows XP SP1 Beta 1
09/09/2002 – Windows XP SP1 Released
03/02/2003 – Windows XP SP1A Released
18/12/2003 – Windows XP SP2 Beta Released
24/02/2004 – Windows XP SP2 Beta Refresh Released
17/03/2004 – Windows XP SP2 RC1 Beta Released
15/06/2004 – Windows XP SP2 RC2 Beta Released
06/08/2004 – Windows XP SP2 Released
21/04/2008 – Windows XP SP3 Released

Categories: Windows, WinXP Tags:

Virus removal tools

May 7th, 2012 No comments

A short list of various virus removal tools I’ve used:

  1. Sophos – Virus Removal Tool
  2. Microsoft
        Malicious Software Removal Tool
        Windows Defender Offline
Categories: Security, Utilities, Windows Tags:

Slow startup and/or logon times with Windows 7?

May 5th, 2012 No comments

Our users were complaining of slow startup and logon performance with our Windows 7 fleet.  We got Microsoft in.  One of the things they recommended was deploying two hotfixes:

An update that improves the startup performance of Windows 7 and of Windows Server 2008 R2 is available
Svchost.exe holds a lock on a service when the libraries for the service are loaded. This behavior prevents other services in the same Svchost.exe instance from starting until the call to the LoadLibrary function is returned.

and

You experience a long domain logon time in Windows 7 or in Windows Server 2008 R2 after you deploy Group Policy preferences to the computer
Issue 1
Assume that you have a client computer that is running Windows 7 or Windows Server 2008 R2 in a domain environment. You deploy Group Policy preferences (GPP) to the client computer by using item-level targeting using security groups. In this situation, a user of the client computer experiences a long domain logon time. This issue becomes more noticeable if the domain controller is only reachable over a slow link.
Issue 2
When you apply GPP by using item level targeting for security groups, local ports are leaked in an OPEN_WAIT state. After some time, the nonpaged pool is depleted and the computer stops responding.

They both worked very well in our environment.

Categories: Active Directory, It's A Bug, Windows 7 Tags:

400 Bad Request and Internet Explorer.

April 30th, 2012 No comments

Bad RequestThe customer reported that they were unable to access our company intranet site.  They were getting an "400 Bad Request" error from Internet Explorer.

So what did I do?  I picked up the phone and asked our "Web Admin" chap,
"What have you done to our poor customer".

‘Nothing Wisefaq, but here’s the answer to the problem:
The customer is a member of 140+ Active Directory Groups, and this is causing the Kerberos token to be far too long for our Apache Web Server to authenticate.’

Once I knew that, I was able to find lots of answers to the problem.  Here are some of them:

  1. 400 Bad Request (Header Field Too Long) when using Kerberos authentication
  2. Apache Bad Request “Size of a request header field exceeds server limit” with Kerberos SSO
  3. New resolution for problems with Kerberos authentication when users belong to many groups
    Number 3 was the crux of the problem, “when users belong to many groups”.  We took the easy way out, and reduced the number of AD Groups the customer was a member of.

Bonus information
Not only was Internet Explorer broken, but any system which used Kerberos, such as our email and document management system.
140+ Active Directory Groups, which were direct membership.  I suspect there are some additional nested group memberships in there too.

Busted laptop–one of those Family/Friends/Neighbour deals.

April 9th, 2012 1 comment

The friend reported that their Windows 7 Dell laptop was bluescreen-ing.

Now this was going to be a post about how simple it was to fix, but as it turns out, it was one of the more difficult problems I’ve worked on. If it was a customer laptop, I would have just re-imaged it and that would have been that. But as it was for a friend, there was the issue of no Dell Recovery Disks and no backups. And there was the small matter of pride involved …

Long story short:
The laptop had two viruses, removing those viruses broke the Dell Recovery partition and the laptop now constantly blue screened. I created a custom Windows 7 install USB stick to fix the laptop.

The long story follows below

Loading up the Action Center, the Bluescreen code was 0000001E. Windows 7 suggested that the fix was Microsoft Security Advisory: Update for the Windows Operating System Loader. But before applying that patch, I ran the Malicious Software Removal Tool. It found the Trojan:DOS/Alureon.a virus.

The laptop had McAfee AV installed.
Now McAfee in my opinion is a piece of crap. Certainly didn’t do much protecting in this case. I grabbed a copy of Microsoft Security Essentials and installed it. It detected TrojanDownloader:Win32/Unruy.H

At the end of the scan, after trying to completely remove the virus, Microsoft Security Essentials suggested that I download the System Security Sweeper. Which has now been renamed Windows Defender Offline. Windows Defender Offline is, essentially a version of Microsoft Security Essentials, on it’s own boot CD/USB.

Windows Defender Offline removed the virus. But it broke the Dell Recovery partition, and Windows boot loader.

At this stage, if it was MY laptop, I would have just thrown on a generic Windows 7 Home Premium edition. But this was a friend’s Dell laptop which came bundled with Office 2010 and other stuff, such as webcam software. To give you some idea of the amount of extra “stuff” Dell bundled, consider this. A standard Windows 7 image file is 2.1GB in size. The Dell one? 6.1GB. Close to 3 times the size.

Remember earlier I said I didn’t have the Dell Recovery DVDs? The tech consensus is that “if you don’t have a copy of the Recovery DVDs, you’re screwed.“. And most of the time, they’d be right.
I had copies of the Dell image files (preload.wim & factory.wim). I didn’t have a way to create the Recovery DVDs. So I was stuck with a 6.1GB image file I couldn’t use. But I did have a generic Windows 7 Home Premium install USB stick.

The Windows 7 Home Premium install USB stick.
I created the USB stick from the Home Premium ISO file, by using the Windows USB creator utility. The reason for using a USB stick is that it allowed me to replace the generic install.wim image file with the Dell factory.wim image. And this worked! Yay for me! I was able to re-image the laptop with the Dell factory image.

After the new Dell install.
The first thing I did was install Windows Service Pack 1. It was a toss up between installing that first, or the Microsoft Security Essentials (MSE) anti-virus program. My thought was that it was better to get the SP1 done first, then install other programs on top of that.

The rest was easy. Installed the security updates for Windows 7, Acrobat Reader, Skype and assorted Dell utilities.

And I removed McAfee anti-virus. :-)

Categories: Security, Windows 7 Tags:

iPhone call diversion

March 31st, 2012 No comments

iPhone Call Forward PropertiesFor some strange reason, the call diversion features on the Apple iPhone are a bit lacking.

On Android, you’re able to easily set diversions based on “No answer”, “Busy” & “Not contactable”.

On the iPhone, the options aren’t there.  So you need to set the diversions the old fashioned way.  Using the GSM Feature Codes.

Function Dial
Divert all  
Activate divert all **21*<voicemail>#
Deactivate divert all ##21#
Query divert all *#21#
   
Divert on no answer  
Activate divert when no answer **61*<voicemail>#
Activate divert when no answer after X seconds **61*<voicemail>**<xx>#
Deactivate divert when no answer ##61#
Query divert when no answer *#61#
   
Divert when not reachable  
Activate divert when not reachable **62*<voicemail>#
Deactivate divert when not reachable ##62#
Query divert when not reachable *#62#
   
Divert when busy  
Activate divert when busy **67*<voicemail>#
Deactivate divert when busy ##67#
Query divert when busy *#67#

 

And for completeness, some other GSM Feature codes.

Function Dial
Own number *#100*
(Telstra network: a menu is displayed)
HLR number *#101#
(Telstra network: Messagebank calls you)
Switch number *#102# or *#105#
Network time *#103#
Voice mailbox number *#104#
Last call *#147#
Categories: How To, PDA Tags:

Using Visual Basic to read though a set of registry keys.

March 12th, 2012 No comments

The problem we have with a corporate deployment of Acrobat Reader, was that we need to uninstall various older versions of Acrobat Reader.  Normally to do this, you need to know the uninstall command string, which changes with each Acrobat Reader release.  One of our senior application packagers said

Why don’t just loop though SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, detect Acrobat Reader in the DisplayName key, then grab the UninstallString.

By jove, what a clever idea.

Doing that in Visual Basic .Net proved me with an afternoon’s programming exercise.  Here is the simplified result:

Dim SoftwareRegistry = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, ".")
Dim SoftwareUninstall = SoftwareRegistry.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", False)
Dim sDisplayName As String = vbEmpty
Dim sReaderUninstallString As String = vbEmpty
Dim sMSIUninstallGUID As String = vbEmpty


For Each item In SoftwareUninstall.GetSubKeyNames
    'MessageBox.Show(item)

    Dim SoftwareUninstallItemKey = SoftwareRegistry.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" + "\" + item, False)

    sDisplayName = SoftwareUninstallItemKey.GetValue("DisplayName")

    If InStr(LCase(sDisplayName), "adobe reader", CompareMethod.Text) Then
        sReaderUninstallString = SoftwareUninstallItemKey.GetValue("UninstallString")
        If sReaderUninstallString <> "" Then
            MessageBox.Show(sMSIUninstallGUID)
        End If
    End If

    SoftwareUninstallItemKey.Close()
Next

SoftwareUninstall.Close()
SoftwareRegistry.Close()

Categories: Code Cutting Tags:

Code to launch an Internet Explorer window from VBscript.

February 12th, 2012 No comments

set IE = WScript.CreateObject("InternetExplorer.Application")

dim ObjTitle

IE.Navigate("about:blank")
IE.Document.Title = "Software Update"
IE.FullScreen = 1
IE.Left       = 0
IE.Top        = 0
IE.MenuBar    = 0
IE.Toolbar    = 0
IE.StatusBar  = 0
IE.Width      = 540
IE.Height     = 151
IE.Visible    = 1

Set ObjBody  = IE.Document.Body
strHTML = "<b><h2>Software Update In Progress</H2><br>" &_
      "Please do not use your computer during this time.  Thank you</B>"
objBody.InnerHTML = strHTML

Categories: Code Cutting, Code from a co-worker Tags:

“Push customized printers down to XP client machines in domain environment?”

February 9th, 2012 No comments

This is a copy of a post which was on Ask MetaFilter, August 2, 2006.


In a Windows Server 2003 domain environment, is there a way to push printers to client machines if they are not shared printers? What about changing printer settings over the network?

I often need to setup networks of about 40 machines with 4 IP printers. They are all identical printers but with different IP addresses. I split them up in groups of 10, with each group printing to one of the printers. I would like to automatically push the printers to client machines.

My first thought was to create a share on the network, ie \\server1\Printers, and then create a login script that installs the printer. The problem with that is, it will attempt to install the printer every time the users log on unless I get rid of the script after the first login, which seems like it’d be counter-intuitive.

The other problem with this is that I need specific printer settings… paper size is Envelope Comm #10, landscape, paper source is Tray 1 (Manual Feed). Even if I could push an installation of the printer with a script, how would I push down these settings?

For my script to install the printer, I had something like this:
start /wait rundll32 printui.dll,PrintUIEntry /if /b "printer_name" /f \\server1\Printers\4350\hpc4x50b.inf /r "IP_192.168.0.252" /m "HP LaserJet 4250 PCL 5e" /z

I’ve read that with Windows Server 2003 R2 there is a new print management tool but I’ve also heard it’s only for network/shared printers.
(Client machines are XP Pro)

posted by Ekim Neems to computers & internet (2 answers total)


The printer share with mount on login (through login script) is the only real way to do this. You can map directly to the IP, but it doesn’t download the drivers to the workstation, configure the default settings of the printer, or allow you to manage who has access through permissions (which is what you’re doing when you mount the share on the workstation).

That is how print admins manage all those complex driver settings for individual users, manage permissions on the printers, and update/downgrade drivers when there are issues.

If you’re still worried about installing the printers every time, through VBScript (or more specifically, WSH) you can enumerate the printers on the workstation and then determine if you want to install the printers. Here’s some sample script:

' Declare variables.
Dim intInstallPrinterFlag, strPrinterName, WshNetwork, clPrinters

' This flag will determine if you want to remove the installed printer first (updated drivers, new settings etc.)
intInstallPrinterFlag = 0

' First argument to the script. Should be in the format \\SERVERNAME\PRINTERSHARENAME strPrinterName = WScript.Arguments.Item(0)

' Declare the WSH object to handle network printer connections.
Set WshNetwork = Script.CreateObject("WScript.Network")

' Enumerate all the printers on the local workstation.
Set clPrinters = WshNetwork.EnumPrinterConnections

' Install the printer, there are none on the workstation.
If clPrinters.Count <> 0 Then
WshNetwork.AddWindowsPrinterConnection strPrinterName

WshNetwork.SetDefaultPrinter strPrinterName

' Now, if there is a printer installed and the install printer flag is set, then remove the existing printer and re-install it.
ElseIf clPrinters.Count > 0 And intInstallPrinterFlag = 1 Then
WshNetwork.RemovePrinterConnection strPrinterName
WshNetwork.AddWindowsPrinterConnection strPrinterName
WshNetwork.SetDefaultPrinter strPrinterName
End If

Save the above in a .vbs file and add to the login script for a user.

This can obviously be built upon (for instance, the duplicate AddWindowsPrinterConnection calls could be wrapped up into a function or sub to prevent duplication.
Extra logic could be added to handle multiple printers on the workstations and how to assign the default printer etc.

If there are any bugs in the script I apologize. I wrote it quickly and from memory. You can find a lot of information about WSH at devguru.
posted by purephase at 12:03 PM on August 2, 2006


As for doing the settings: Open the printer’s Properties sheet, click the Advanced tab, then click the Printing Defaults button. This brings up a window that looks exactly like the usual Printing Preferences window except that the window title is "blah blah Printing Defaults" instead of "blah blah Printing Preferences". Any settings you make here will become the defaults for any new installation of or connection to that printer.
posted by flabdablet at 9:09 PM on August 2, 2006

Categories: How To, Printing Tags: