Archive for the ‘Work’ Category

Ah Adobe, those merchants of all things difficult. While investigating their CS5.5, a need to uninstall CS5 installations presented itself. Sounds simple enough right? Their new Adobe Application Manager Enterprise Edition generates an msi, I’ll just uninstall that. No, that doesn’t work.

Next thing is it turns out there’s another entry in the registry for what gets executed if you manually uninstalled it, something like this: C:\Program Files\Common Files\Adobe\OOBE\PDApp\core\PDApp.exe –appletID=”DWA_UI” –appletVersion=”1.0″ –mode=”Uninstall” –mediaSignature=”{A1BC7068-C1BA-410F-8B9A-DB807C803DE2}”

Maybe I can run that with some sort of silent switch… No that doesn’t work either.

What you need to do is go back to the original source for your CS5 install, into the Adobe CS5\deploy folder and grab one of the uninstall-en xml files. In my case, I grabbed the uninstall-en_GB.xml.  Then you’ll still actually need to use a different Setup.exe for the uninstall, you’ll want to use the one in the DWA folder, not the Core folder and finally you’ll end up with a command like:

“C:\Program Files\Common Files\Adobe\OOBE\PDApp\DWA\Setup.exe” –mode=Silent –deploymentFile=”%PATH%\uninstall-en_GB.xml”

and you can replace %PATH% with the location of this xml file.

And keep swearing at Adobe…


Read Full Post »

There’s plenty of information around about using ocsetup to install Windows components in Vista and Windows 7. However, there’s not a lot of information about installing items with prerequisites. I needed to install MSMQ-HTTP recently and found that it required WAS and IIS to be installed beforehand. Now, I found some MSDN information on installing the prerequisites but found that I still couldn’t install MSMQ-HTTP using that unattended file.

What I found was that the item required needed to be specified in the unattended file, but so did the parent items in the tree. So, for MSMQ-HTTP, I also needed to add MSMQ-Container and MSMQ-Server, as well as MSMQ-HTTP.

With all the items now specified in the unattend.xml file, I could run ocsetup MSMQ-HTTP /unattendfile:”unattend.xml” using the following unattend.xml:

<?xml version=”1.0″?>
    <package action=”configure”>
      <assemblyIdentity name=”Microsoft-Windows-Foundation-Package” version=”6.1.7600.16385″ language=”neutral” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ versionScope=”nonSxS”/>
      <selection name=”WAS-WindowsActivationService” state=”true”/>
      <selection name=”WAS-ProcessModel” state=”true”/>
      <selection name=”WAS-NetFxEnvironment” state=”true”/>
      <selection name=”WAS-ConfigurationAPI” state=”true”/>
      <selection name=”IIS-WebServerRole” state=”true”/>
      <selection name=”IIS-WebServer” state=”true”/>
      <selection name=”IIS-CommonHttpFeatures” state=”true”/>
      <selection name=”IIS-ApplicationDevelopment” state=”true”/>
      <selection name=”IIS-HealthAndDiagnostics” state=”true”/>
      <selection name=”IIS-Performance” state=”true”/>
      <selection name=”IIS-WebServerManagementTools” state=”true”/>
      <selection name=”IIS-IIS6ManagementCompatibility” state=”true”/>
      <selection name=”IIS-StaticContent” state=”true”/>
      <selection name=”IIS-DefaultDocument” state=”true”/>
      <selection name=”IIS-DirectoryBrowsing” state=”true”/>
      <selection name=”IIS-HttpErrors” state=”true”/>
      <selection name=”IIS-HttpRedirect” state=”true”/>
      <selection name=”IIS-RequestFiltering” state=”true”/>
      <selection name=”IIS-NetFxExtensibility” state=”true”/>
      <selection name=”IIS-HttpLogging” state=”true”/>
      <selection name=”IIS-LoggingLibraries” state=”true”/>
      <selection name=”IIS-RequestMonitor” state=”true”/>
      <selection name=”IIS-HttpTracing” state=”true”/>
      <selection name=”IIS-HttpCompressionStatic” state=”true”/>
      <selection name=”IIS-ManagementConsole” state=”true”/>
      <selection name=”IIS-ISAPIExtensions” state=”true”/>
      <selection name=”IIS-Metabase” state=”true”/>
      <selection name=”MSMQ-Container” state=”true”/>
      <selection name=”MSMQ-Server” state=”true”/>
      <selection name=”MSMQ-HTTP” state=”true”/>

Read Full Post »

A recent application I repackaged into an msi put entries into the user profile. Of course, the entries didn’t work by default on XP and Vista, so I got around this by doing the following:

  1. Creating a subfeature of the Complete feature. Call this OS_Specific_Files
  2. For this feature, Add Condition to create 2 conditions: VersionNT >= 600 (for Vista) and VersionNT < 600 (for XP)
  3. Inside the different conditions create the folder structures and place files as required.

The other aspect of this was to trigger the repair when the user logged on as there was no application entry point. ActiveSetup is one way to do this, but I did this through the Run key in order to do the repair at each logon. This can be done by:

  1. Create a registry key in HKLM\Microsoft\Windows\CurrentVersion\Run
  2. Name = [ProductName], Value = msiexec /fp [ProductCode] /qn

Read Full Post »

VBScript get java version

The java version installed on a PC can be determined by typing

java -version

on a command prompt, but this information is difficult to access through VBScript. I recently put together an installation that put java files into the java version currently installed. This meant finding out which one was the current version, so I put together the following VBScript to compare the version of java.exe in system32 with all java.exe files inside C:\Program Files\Java

Set oShell = CreateObject(“WScript.Shell”)
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
sFile = oShell.ExpandEnvironmentStrings(“%systemroot%”) & “\system32\java.exe”
version = oFSO.GetFileVersion(sFile)
PFDir = oShell.ExpandEnvironmentStrings(“%programfiles%”)
javaDir = PFDIR & “\Java”
Set oFolder = oFSO.GetFolder(javaDir)
Set colFolders = oFolder.SubFolders
For Each folder In colFolders
 thisver = oFSO.GetFileVersion(folder & “\bin\java.exe”)
 If thisver = version Then
  JavaVersion= folder & “\”
 End If

As I was doing this inside a custom action in an msi, I changed the variable JavaVersion to Session.TargetPath(“INSTALLDIR”)

Read Full Post »

Fix COM+

I know there are a lot of things that can go wrong with COM+ applications, but when I came across

Error code 80080005 — server execution failed, these directions were the way to go:

net stop msdtc
msdtc -uninstall
msdtc -install

There are a couple of Microsoft articles around – 315296 and 870655, but unless you’ve got a lot of patience, try the above first.

Read Full Post »

This site comes up first for silent installs, but has good information for some non-msi silent installs – http://unattended.sourceforge.net/installers.php

Read Full Post »

I wrote this up for appdeploy back in March 2007, but reproduce it here:


Installing Google Earth Pro 4 in a corporate environment using SMS using a per-machine based installation.

This solution consists of 5 main steps:

1. Do an installation of Google Earth, including the registration information. This puts down a bunch of files into C:\Documents and Settings\USERNAME\Application Data\Google\GoogleEarth. As well as a whole lotta reg keys under HKEY_CURRENT_USER\Software\Google.

2. Put these files into a safe location. Export the registry keys into a .reg file.

3. I created an msi to dump these files and the .reg file into the Program Files>Google Earth directory. I also created an Active Setup key to run a script when the user next logs in to the machine. It’s located at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\GoogleEarth and
I created ComponentID, StubPath and Version. There are better places to read up on Active Setup…
The last thing I put into the msi was the vbscript referred to in the StubPath key.

4. This script which will be on the local machine and run as the user should create C:\Documents and Settings\USERNAME\Application Data\Google\GoogleEarth where you replace USERNAME with the correct user. Then there are 4 reg keys that contain this path. I created them in vbscript as follows:

Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

' Create the two keys if they don't exist
strKeyPath = "Software\Google\CommonSettings"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath
strKeyPath = "Software\Google\Google Earth Pro"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath

' All keys have the same strValue
strValue = "C:\Documents and Settings\" & strUser & "\Application Data\Google\GoogleEarth"

strKeyPath = "Software\Google\CommonSettings"
strValueName = "KmlPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

' Same strKeyPath from here on
strKeyPath = "Software\Google\Google Earth Pro"
strValueName = "DefaultKMLPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "KmlPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "CachePath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

Then, I copy the required user files into their profile..

Const OverWriteFiles = True
objFSO.CopyFolder "C:\Program Files\Google\Google Earth Pro\UserFiles", strDirectory, OverWriteFiles

And then install all the other registry keys into current user. This includes the registration information

strCommand1 = "regedit.exe /s " & Quotes & PWD & "UserFiles\google_current_user.reg" & Quotes
WScript.Echo strCommand1
return = objShell.Run (strCommand1,0,True)

5. To get all this to run through SMS, I wrote a vbscript which performs the install with .iss file
“GoogleEarthWinProSetup.exe /s /SMS /f1setup.iss /f2c:\google.log”. Of course, do what you have to do to correctly point to the setup and iss files. After that I found that googleearth.exe was running, so I kill that process so that it doesn’t go off and create reg keys. Lastly, I install my msi.

Clear as mud!

Read Full Post »

Older Posts »