Page 1 of 1

[solved] Context-dependent update install fail

PostPosted: 11.08.2011, 05:06
by ErikB
I love WSUS offline update and have been using it without a hitch for the last year, but I ran into something bizarre today that's been driving me crazy.

I've got an autoit script that's starting doupdate.cmd (with admin rights) from a flash drive to run offline updates on a client machine running 64-bit Vista Home premium. According to the wsusofflineupdate log, everything runs fine with no errors. However, when I watch them processing, each "Installing ../w60-x64/glb/[current update]" line is followed by :
Code: Select all
c:\windows\system32\pkmgr.exe' is not recognized as a valid internal or external command, operable program, or batch file.

it then continues as if it had worked just fine. There are no errors, warnings, or anything else out of the ordinary in the logs, but of course the update hasn't actually been installed.

If I launch the updates from OfflineUpdate.exe, as the same user, from the same flash drive, and with all the same flags, however, everything works perfectly fine with no hitches.

Does anyone know of any sort of permissions, environment variables, working directory, or any other issue that might be causing this problem? I'm baffled.

Thanks for your help!

-=Erik

Re: Context-dependent update install fail - no error in logs

PostPosted: 11.08.2011, 07:45
by Gerby
Hi Erik and welcome to the forum!

Initial approach: The faulty line indicates that the program "pkmgr.exe" is missing. However, it should read "pkgmgr.exe". Is this just a typo in your post?

The pkgmgr.exe is called by client/cmd/InstallOSUpdate.cmd. Maybe you should start further search for a solution there.

Greetings
Gerby

Re: Context-dependent update install fail - no error in logs

PostPosted: 11.08.2011, 07:55
by Gerby
Supplement...

If doupdate.cmd is run from a 32-bit command line on a 64-bit Windows, it cannot find pkgmgr.exe because this file doesn't exist in the SysWOW64 directory (SysWOW64 is actually used for "System32" in a 32-bit environment). I guess that your AutoIt script starts a 32-bit environment in contrast to just starting doupdate.cmd manually from a regular command line (64-bit).

Re: Context-dependent update install fail - no error in logs

PostPosted: 11.08.2011, 11:06
by WSUSUpdateAdmin
You may want to do the same "UpdateInstaller.au3" does:
Code: Select all
If (@OSArch <> "X86") Then
  DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
EndIf
Run(@ComSpec & " /E:32768 /D /C Update.cmd" & $options, $scriptdir, @SW_HIDE)

See AutoIt-Help (search for "Wow64DisableWow64FsRedirection") for details.

RTW

Re: Context-dependent update install fail - no error in logs

PostPosted: 11.08.2011, 15:18
by ErikB
Thank you both! I do run the overall script as 32-bit, just reaching out to the 64-bit side as necessary and it never even occurred to me to call the script without redirection :oops: .

Thanks again!