I'm working on a new image, and have about 30 different post-installation tasks of various MSI's, zip files, etc. All work well, except for about 4 programs so far - 3 random school software titles, and the KACE agent. (I have another topic open for the KACE agent). The other ones either don't install, or pop up with that annoying Windows MSI box like if I was to type something incorrectly...but I didn't. I use the typical install command:

msiexec.exe /i "install.msi" /passive


start /w /msiexec.exe /i "install.msi" /passive

Not sure why these aren't working. I get errors on them mainly, but if I run them from Windows, I don't run into any issue - it installs just fine.

Here is some more information about my image:

-using the K2000 post install task converter for Windows 7
-image is Windows 7 x64, but I run into the same problem with some x86 machines
-We recently updated our K2000 to version 3.4.63129 (not sure if that matters)

Any suggestions? It sucks to have to do this manually after it images (I haven't tried K1000 distribution yet - but I shouldn't have to - nor can I, if I can't even install the KACE agent). 

0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


Have you tried adding a reboot postinstall task (reboot, buffer for reboot, sleep) prior to installing the troublesome MSIs?  I have a couple of programs in my scripted installs that *will not* install unless a reboot occurs beforehand.  This is typically more true of my XP scripted installs than my Win7 scripted installs, but a couple programs remain stubborn in both.  Here's the setup, in case you want to try:

Postinstallation Tasks

1) Reboot
2) Buffer for Reboot
3) Sleep

* Put tasks in this order prior to postinstallation task that requires a reboot prior to run/install.

1) Reboot

Name        Reboot
Type        BAT Script
Runtime Envir    Windows

BAT Script    shutdown -r -t 05 -f

2) Buffer for Reboot

Name        Buffer for Reboot
Type        BAT Script
Runtime Envir    Windows

BAT Script    ping loopback -n 60

3) Sleep

Name        Sleep
Type        Application
Runtime Envir    Windows
File        ksleep32.exe

Command Line    ksleep32.exe 60

* note - separate EXEs for x86 and x64:

    * for x86, copy ksleep.exe from \\ikbox\peinst\winpe_build\x86\windows\system32
    and rename to ksleep32.exe prior to creating Postinstallation Task

    * for x64, copy ksleep.exe from \\ikbox\peinst\winpe_build\amd64\windows\system32
    and rename to ksleep64.exe prior to creating Postinstallation Task


Hope that helps!


Answered 02/04/2013 by: jverbosk
Red Belt

  • Thanks - I'll try this. What does the sleep command do? And the buffer? I have some Post Install Converter reboot tasks that seem to work fine for restarting the machine and continuing the scripts where it left off...but maybe I should be using these buffer and sleep scripts as well?
  • Also, it seems that some of these programs are installing fine once I zip up the MSI/contents and call it via a RUN.BAT file with the MSIEXEC command inside. Not sure why it would work from a batch file and not directly from the MSI command within the K2000. I'm running a few more test deployments to see if it's fully working.
  • The sleep and buffer basically allow things to settle following the reboot. These three reboot tasks are not typically necessary in the Win7 scripted installs (particularly with the postinstall converter in place), but I have found it necessary for some stubborn apps.

    Yes, that's how I setup all of my MSI installs - after much trial and error, I found that they are generally more reliable called from batch files (particularly in my Win7 scripted installs). I also prefix the batch file name with "call" (i.e. "call batchfile.bat") in the task detail's Command Line field as another means of reliability.

Please log in to comment



It's late on a Friday and I haven't tested this, but does "/msiexec.exe" work?

Answered 02/01/2013 by: dugullett
Red Belt

  • oops, sorry - didn't mean to do /msiexec.exe. It's late on a Friday for me too, and have been looking at this for too long. This is a typo - I don't have a "/" in front of MSIEXEC.

    This is what I have:

    start /w msiexec.exe /i "install.msi" /passive

    I have also tried same installs just as:
    msiexec.exe /i "install.msi" /passive
    • The four random programs are they all at the end of your post installs? So all your installs work then these last four do not?
      • These same installs worked on the older version?
  • These are all new installs since the new K2000 version.
Please log in to comment

Are you having the machine login as an admin in your post commands prior to running the msi's.  It could have something to do with UAC.

can you place the software in your master prior to syspreping or install the software with the k1000. 

You may want to examine the kace batch file that runs at post to see if something is getting scripted incorrectly.  Image a box and do not tell it to restart.  from the main menu you can choose recovery open a command window and go to c:\kace and scan the main batch file and support files.

Answered 02/01/2013 by: SMal.tmcc
Red Belt

  • I will check UAC. I setup a second image with just those 4 installs to test it, and afterwards I went to C:\ and there was no KACE folder...almost as if it didn't create it or removed the files after.
    • kcleanup deletes it in the last step. You need to cast image and do not check to automatically reboot, return to the main menu and choose recovery and open a command window. go to the c:\kace folder and edit the kace batch file that runs all the post tasks and rem out the kcleanup so it will remain after.
    • I also use auto logon in my sysprep file as an admin user
  • Yes, I'm using a local admin account on the image and have it set to autologin twice, since we do a reboot after WSNAME, and then it logs in and joins the domain and installs the kace agent. I just find it weird that they install fine as the same local admin login when I do it manually, just not automated through the post install.
  • Ok - I looked at the contents of the installcmds.bat and here it is. Seems correct.

    %systemdrive%\KACE\bin\cmdhide.exe hide && cd %systemdrive%\KACE\Applications\277 && start /wait msiexec /qn /i "Qwizdom Connect.msi"
    %systemdrive%\KACE\bin\cmdhide.exe hide && cd %systemdrive%\KACE\Applications\282 && start /wait msiexec /qn /i "TextPad622.msi"
    %systemdrive%\KACE\bin\cmdhide.exe hide && cd %systemdrive%\KACE\Applications\289 && start /wait msiexec /qn /i "Classroom Performance System.msi"
    %systemdrive%\KACE\bin\cmdhide.exe hide && cd %systemdrive%\KACE\Applications\50 && start /wait msiexec /qn /i "ampagent-5.4.5315-x86.msi" HOST=kbox.cusd200.org
    %systemdrive%\KACE\bin\cmdhide.exe hide && cd %systemdrive%\ && rd /s /q %systemdrive%\KACE && %systemdrive%\kcleanup.exe && del /f /q %systemdrive%\kcleanup.exe
    • You are right it looks correct.
      • it may be the msi's themselves. I downloaded qwizdom and it is repackaged using installshield 2011.
        Since you are joined to a domain you can try to place the installs on a share and run them as a run once after kace is done
        run once as a post command:
        start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v Runpostbatch /d c:\temp\install.bat
  • Would it be possible to build the same postinstall sequence but with a Scripted Install? If the tasks complete with a SI then it might indicate the image itself is corrupt.
Please log in to comment

Have you also tried running the deploymenty with just the one task and seeing if it deploys?  If so, then maybe you need additional reboots prior to running those tasks or have something blocking it from a previous task and may need to reorder some things.


Answered 02/01/2013 by: andrew_lubchansky
Black Belt

  • hmmm - yes I've tried it with just these 4, and they all fail and don't install. I also don't see the C:\KACE folder anywhere either.
Please log in to comment

I don't have an explanation if this works, but I have run into it a number of times.  Use the install switch last, so:


msiexec.exe /passive /i "install.msi"


Lead L3 Enterprise Solutions Engineer, K2000
If my response was helpful, please rate it!

Answered 02/03/2013 by: cserrins
Red Belt

  • Just tried this, and it doesn't work. They all give the Windows Installer error/guide screen showing how to use the msiexec commands. I'm not sure why these 4 won't work via the K2000 and only manually - especially the agent.
  • Have you tried running the command from a non imaged machine and see if the it works? I usually don't include quotes on the filename (not that it should really matter) unless there is a space in the name.
Please log in to comment
Answer this question or Comment on this question for clarity