Home Forums Software InstaDMG Office 12.1.2 Updater

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #373768
    Anthony Reimer
    Participant

    Once again, Microsoft seems to have released a package updater (12.1.2) that doesn’t work in an InstaDMG workflow. Same problem as before: InstaDMG reports success in the logs, but the application is not updated.

    What is everyone else experiencing?

    Anthony

    #373770
    pteeter
    Participant

    I haven’t deployed it or tested it yet but my rule of thumb with MS updates, even MPKG/PKG format is simple…

    logGen+pkgGen+Iceberg

    Just repackage it.

    #373781
    mosen
    Participant

    I’m doing some work to look into which part of the script is failing with the MS Office updaters.

    At the moment I can bypass their checks by forcing ShouldInstallPackage() to return 1 every time, and forcing the “Quit” package to be deselected – but this is definitely not the way to solve the problem. It ends up installing every part of the update i.e proofing tools in swedish and student edition updates.

    At the moment i’m looking at the script which builds the symlinks in /tmp to each package but i havent narrowed down the area which causes the installer to exit. Hopefully I can find the function responsible and generate some kind of patch, or maybe the afp548 gods will consider a built in workaround πŸ™‚

    Edit: I found someone that already determined the volume check didnt work for installing to other locations,
    The function volumeOs1049OrHigherTest() is the culprit.

    I might try creating a drop-in replacement for the check_volumes script as the easiest way to work around it.

    #373782
    mosen
    Participant

    Ok, followed the instructions as per the blog i found (cant post URL because im a noob) but if you search for office distribution.dist youll find it.

    Basically the only way to make the office updater work with InstaDMG is to replace the contents of the function
    volumeOs1049OrHigherTest() inside distribution.dist with return true;

    There is a much more detailed howto on the blog about how to go about doing this.

    Tested the updater and works great with InstaDMG!

    Update: Unghh.. i made a few other mods than that while testing… The VolumeMeetsOSRequirementsTest(); runs two functions so the proper fix would be either:

    1. find the line which has result = VolumeMeetsOSRequirementsTest(); just after ShouldInstallPackage()
    comment it out, i.e make the line look like this by adding forward slashes:

    //result = VolumeMeetsOSRequirementsTest();

    or 2. make the other function (volumeHasUpdatableVersionTest()) return true also.

    Happy Imaging! (im still trying hard to conquer CS3)

    #373803
    mosen
    Participant

    Just another update.

    Frustratingly enough It looks like the updates are being installed but my office programs still report 12.0.0 when booting the image. Back to the drawing board i guess. I’m going to see whether the packages are modifying the instadmg mounted image or my host filesystem now.

    #373804
    mosen
    Participant

    This could be a long forum post if i keep going like this πŸ™‚

    the package_updatable script is run for each choice to check if there is an application which qualifies for the update.
    The script contains a few variables to detect the desired install volume (in our case the InstaDMG mount point) but these are commented out..

    Inserting these variables back into the update detection in some way should allow these updates to run on our custom volume (InstaDMG mount).

    So far:
    – The OS detection routine must be patched to force the update to install to our DMG.
    – The package_updatable script must be patched to use alternate install locations.

    #373810
    mosen
    Participant

    OK, so some more information.

    Part of the process of finding updatable copies uses a compiled program called find_office. This seems to work for normal volumes but not volumes mounted under /tmp (like InstaDMG). At a very rough guess they might expect the install volume to exist under /Volumes.

    Patching this to return /tmp/(instadmg mount)/Applications/Microsoft Office 2008 makes everything work correctly. ALL applications are patched (not just the common/utils like before),

    So I’m working on a patch that will convert office updaters to work with InstaDMG.

    #373820
    knowmad
    Participant

    There is a much simpler way of doing this, though it is very UN-instaDMG-ish in its execution………..
    1) Install Office on a clean machine.
    2) Update the hell out of it.
    3) Grab JUST the office folder from the applications folder and package it.
    4) Create a one time login script that runs the office first run (essentially, open word once, then quit it, very simple).
    5) Install your re-packaged office and your one time login script via instaDMG.
    DONE!

    No mucking around, no major surgery and nothing that will kill other parts of the system/software/brain
    I know it is not very much inline with the InstaDMG way of thinking except on the most basic level, which is to simplify your life as an admin.
    The updates (so far as I can tell) update the first run info as well as the already installed pieces, net result is that you can now ‘re-install’ from an updated office folder.

    On the other hand, your work is GREATLY appreciated. Going forward it will make it possible to add just some updates and be done/happy with that.
    So, thank you.

    #373824
    Anthony Reimer
    Participant

    [QUOTE][u]Quote by: knowmad[/u][p]There is a much simpler way of doing this…
    [/p][/QUOTE]

    Since I have no literacy in authoring login/preflight/postflight scripts, that way is [i]not[/i] easier. Regardless, I did do something similar to create a 12.1.1 Office package, but now that 12.1.2 is out, I would have to do all of that work over again β€” [i]certainly[/i] un-InstaDMG-like. Pushing out the 12.1.2 updater via ARD after the fact is my current plan unless mosen’s fine work creates a suitable patch.

    #373830
    mosen
    Participant

    Well, looks like i have a working scenario now πŸ™‚ Stay tuned..

    Update:
    This will take a while as I need to run InstaDMG each time to test…

    In the meantime if anyone who knows the InstaDMG script back to front can tell me how to adapt it
    to mount the temp image at /Volumes.. that would be a temporary workaround (the office installer scripts assume all target volumes are mounted under /Volumes).

    I tried changing the var CURRENT_IMAGE_MOUNT to include /Volumes but hdiutil eject/convert fails at the end.
    (I do get a shadow image containing an updated copy of office 2008).

    Otherwise im going to keep patching office so that it works with the usual /tmp mountpoint (but yeah, it could take a while due to running InstaDMG all the time :).

    Update #2:
    Scrap that, looks like I’ve patched the package to run with InstaDMG normally. I won’t know for sure until i boot the DMG file… It’s tricked me a few times before πŸ™‚

    Update #3:
    DMG boots and is preinstalled with office 12.1.0.. so the changes are a success.

    First off I’ll publish the manual workaround and then do a droplet or something for easy conversion of existing office update packages.

    #373831
    mosen
    Participant

    [b]Converting office updaters to work with InstaDMG[/b]

    This is the process to convert any Office 2008 updater to work with the InstaDMG Workflow.
    Script to do this automagically will appear later on (depends when I get the time).

    1. Open up the updater package by control-clicking or right-clicking on it and selecting “Show Package Contents”
    2. Edit the file distribution.dist:

    – Underneath the function volumeOs1049OrHigher() insert a statement so that it always returns true. The code should end up like this:

    [code]
    function volumeOs1049OrHigher() {
    return true;
    var result = volu… etc
    [/code]

    – Underneath the function volumeOs1049OrHigherTest() insert a line like before so it looks like this:

    [code]
    function volumeOs1049OrHigherTest() {
    return true;
    var result = false;
    etc….
    [/code]

    The changed lines are the ones which read ‘return true;’

    3. Replace the find_office binary with a shell script:

    – Still inside the package contents untwist or double click the Resources folder.
    – Inside Resources there will be a file called find_office.. delete or (better) rename this to orig_find_office (or whatever you like, we won’t be using this anymore).
    – Create a new text file with the following bash script:

    [code]
    #!/bin/sh
    echo “$1/Applications/Microsoft Office 2008”
    [/code]

    Note: this script assumes that your office installation is inside the applications folder on the image. Most of the time this is true πŸ™‚

    – Save this text file inside the Resources folder as find_office (no extension). Make it executable via command line chmod +x or the gui.

    4. Place this modified package inside your CustomPKGs numbered folder. If all is working correctly you should see the updater update each application rather than just running the “Quit Microsoft Applications” sub-package.

    This has been tested with 12.1.0.
    [b]Update[/b]: Tested with 12.1.1 and 12.1.2 and is working correctly.

    The reason for each modification is that 1. The script doesn’t seem to detect the operating system installed on the instaDMG mounted volume and 2. find_office is a regular obj-c binary which seems to assume that disks always have a mountpoint at /Volumes (which is not the case with InstaDMG, where we use /tmp for our temporary install volume πŸ™‚

    #373844
    mosen
    Participant

    I have uploaded an AppleScript droplet which will convert existing Office Update mpkgs to work with InstaDMG by modifying them as above.

    The code is pretty alpha so backup your updates before you mod them.

    File is awaiting approval by the afp548 mods πŸ™‚

    #373852
    Anthony Reimer
    Participant

    The manual fix that mosen has supplied is not working for me. My InstaDMG install for Office is:
    β€’ 12.1.1 packaged install
    β€’ 12.1.2 update (modified)

    I looked in the logs and found the following error:

    installer: Error verifying Office 2008 12.1.2 Update package contents: JavaScriptError

    At least it logged the failure! πŸ™‚ Perhaps I will try again with mosen’s AppleScript.

    #373856
    mosen
    Participant

    I guess that would be an error with distribution.dist. Sorry, i should have been clearer about the modifications to that script. The only lines you need to add are the ones that say return true;

    Does that fix it up for you? maybe its something totally different and im assuming too much πŸ™‚

    #373908
    knowmad
    Participant

    so…. that applescript…. care to drop it someplace else until Josh finds the time to vet it?
    Knowmad

Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.

Comments are closed