August 26, 2009 by leereid
I’ve written before about the usefulness of ActiveSetup, but today am here to warn you about a pitfall of using ActiveSetup.
When working with roaming profiles, depending on how your environment is configured, the HKCU registry hive will also roam with users. This is fine if your active setup action is a profile related thing (perhaps create a file in their profile, run a script to move something in their profile). However, if it’s not (maybe creating a local AppData file or something else local), ActiveSetup will work fine the first time, but won’t re-run for the user when they logon to another computer. This could break what you were trying to do.
So, some final words: take care with ActiveSetup, it may not be the tool for your job. An alternative could be the Run key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) or RunOnce (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce)
Posted in Vista, Windows 7, XP | Tagged ActiveSetup | Leave a Comment »
August 20, 2009 by leereid
This came up at work again, so I’ve decided that so I can find it this time, I’ll post it here. This is directly from SMS Guys who have moved on to here.
1. Create a collection that will contain all clients to be excluded from another collection (we’ll call it ‘ExclusionsCollection’ for this example.)
2. Once you have that, go into the Collections table in the SMS SQL database and find the row that contains ‘ExclusionsCollection’. Note the cooresponding ‘ResultTableName’.
3. In the collection that you want to exclude the members of ‘ExclusionsList’ from, copy and paste the following query:
select SMS_R_System.ResourceID,SMS_R_System.ResourceType,
SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,
SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client
from SMS_R_System where Client = 1 and ClientType = 1 and
ResourceId not in (select ResourceID from SMS_CM_RES_COLL_XXXxxxxx)
4. Replace the item above in red with your ResultTableName.
Posted in SCCM, SMS 2003 | Tagged Collections, Exclusion, SCCM, SMS 2003 | 1 Comment »
August 3, 2009 by leereid
I read about MSIFASTINSTALL with great hope that it would reduce installation times as documented in Alex Verboon’s article. Sadly this hasn’t been my experience. I decided I’d test a sequence of installations including Flash Player, Access Runtimes, Reader, QuickTime, Java 6, Silverlight and Shockwave on Windows 7 RC. There were also some other non msi installations.
My average time for 2 runs without MSIFASTINSTALL was 7 min 29 secs, 3 runs with MSIFASTINSTALL=7 was 8 min 3 secs and 2 runs with MSIFASTINSTALL=1 was 7 min 47 seconds. I would have loved to have seen this speed up a few installs, but sorry to say – not for me!
Posted in Windows 7, msi | Tagged msi, MSIFASTINSTALL, Windows 7 | Leave a Comment »
Java 6 Runtime installations will automatically upgrade older Java 6 version through the beauty of the msi upgrade table. However, if you need to install a specific Java version, Sun has some documentation.
Basically run the setup.exe with the parameter STATIC=1 and the install will generate a different msi that will install a standalone version. You can then use your standard installation of other versions (extracted or otherwise) for a different update version.
Posted in Packaging, msi | Tagged Java, msi, setup | Leave a Comment »
I came a across an application today that wouldn’t install on Vista, reporting that my computer required Windows NT 4 or later. In order to get the install to run on Vista, I created a shim which let it run on Vista.
What’s a shim? There’s not a lot of simple explanations around, but basically it’s some instructions to the OS for how to run a program. In particular, how to handle compatibility issues by telling the operating system how to run the program. With this you can tell the computer to run something on Vista like it would on XP or Windows 98.
The steps involved are pretty well documented on thelazyadmin, but I’ll add a couple of things.
Firstly, you need to download and install Application Compatibility Toolkit.
Then follow thelazyadmin’s guide to create your shim.
Last, run
sdbinst “path_to_my.sdb”
to implement your shim and then see how your program runs!
Posted in Vista, shim | Leave a Comment »
March 31, 2009 by leereid
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:
- Creating a subfeature of the Complete feature. Call this OS_Specific_Files
- For this feature, Add Condition to create 2 conditions: VersionNT >= 600 (for Vista) and VersionNT < 600 (for XP)
- 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:
- Create a registry key in HKLM\Microsoft\Windows\CurrentVersion\Run
- Name = [ProductName], Value = msiexec /fp [ProductCode] /qn
Posted in CodeProject, Packaging, Vista, Work, XP, msi | Tagged CodeProject | Leave a Comment »
March 30, 2009 by leereid
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
Next
As I was doing this inside a custom action in an msi, I changed the variable JavaVersion to Session.TargetPath(“INSTALLDIR”)
Posted in VBScript, Vista, Work, XP, msi | Comments Off
February 16, 2009 by leereid
This is a fairly simple one, using the FileSystemObject
Set objFSO = CreateObject("Scripting.FileSystemObject")
filePath = "C:\Temp\file.txt"
objFSO.DeleteFile(filePath)
Note that this is only going to work if the file exists
Posted in VBScript, Vista, XP | Leave a Comment »
February 12, 2009 by leereid
Another Microsoft site – Thrive has been launched – anyone else think it looks utterly useless?
Posted in Uncategorized | Leave a Comment »