1. How do I create a silent script to uninstall a software? It is a .EXE file not .MSI file (OnScreen Takeoff)?

2. The script below does a silent install which works, but what do I add to point to a database so it knows to retrieve info from there?

"msiexec.exe /q /l* logfile.txt /i C:\Users\<username>\Downloads\ost3906.msi REBOOTYESNO=No"


Any help is appreciated, thank you.

0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Try to take a look into your K1000's software inventory. You should find the software there if it has been installed on a managed PC (inventory has to have run at least once after installation).
If not, install OnScreen Takeoff on a managed PC, run inventory on this PC and check back to your your K1000's software inventory.

By clicking on the software inventory item of "OnScreen Takeoff" you're going to see the details of this software.

And your K1000 will display the "Product Un-Install Command" (in the "Support" section).


Since you say setup it is an MSI, it will look like "MsiExec.exe /X{AAAAAAAA-BBBB-CCCC-DDDD-EEEEFFFFGGGG}".
Add the "/q" switch like you used it in the silent install to make it silent, too.

You could also add logging, if you wish.


Good luck!


Answered 08/29/2013 by: chrpetri
Orange Senior Belt

  • Not seeing mention of any KACE products in use. But the same details can be gleaned from the registry. Find details at http://msdn.microsoft.com/en-us/library/windows/desktop/aa372105(v=vs.85).aspx
    • This content is currently hidden from public view.
      Reason: Removed by member request
      For more information, visit our FAQ's.
  • You're right!

    Attention on x64-machines: check
    as well!
    • This content is currently hidden from public view.
      Reason: Removed by member request
      For more information, visit our FAQ's.
  • Thanks to both, I was able to do the script below and test on my machine and it worked, the only portion left for this is to figure out how to push this to 100 users via Group Policy:
    /node:computername product where name="On-Screen Takeoff" call uninstall.

    2. Any idea what I need to put in the script below so it points to a database?
    "msiexec.exe /q /l* logfile.txt /i C:\Users\\Downloads\ost3906.msi REBOOTYESNO=No" - See more at: http://www.itninja.com/question/need-scripting-help-silent-uninstall-of-software-onscreen-takeoff-silent-install-point-to-database#sthash.HY2Y5Qgi.dpuf
    Thanks! - See more at: http://www.itninja.com/question/need-scripting-help-silent-uninstall-of-software-onscreen-takeoff-silent-install-point-to-database#sthash.HY2Y5Qgi.dpuf
    • I can't tell exactly because I don't know that software and don't have the MSI here, but you could search yourself:

      1. Get an MSI Editor like Orca (http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557(v=vs.85).aspx) or InstEd (http://www.instedit.com)
      [I prefer InstEd :) ]

      2. Open your ost3906.msi file with that editor

      3. On the left pane you see a list of all tables in that MSI.
      Look for the "Property"-table and select it.

      4. Now you should see the MSI's properties on the right pane. Check them for a property that might fullfill your needs, like "HOSTNAME", "SERVERNAME", "DBSERVER", ...
      If you can't find anything there take a look in the "InstallExecuteSequence" table and the "InstallUISequence" table, there you should check the "Condition"-column for interesting names.

      5. If you found a matching name just add it to your launch command and give it your desired value, e.g.:
      msiexec.exe /q /l* logfile.txt /i C:\Temp\ost3906.msi REBOOTYESNO=No SERVERNAME=my.host.local

      If it did not work try other property names you found in the MSI.
  • I'll look for it, thanks for the info, final question (for now is), the script below for the install, it's prompted me with the wizard, what switch am I missing to keep it as a silent install:

    msiexec.exe /q /l* logfile.txt /i C:\Users\schetry\Downloads\ost38036.msi REBOOTYESNO=No
    • Using /q or /qn should supress any UI output from the installer.
      Try to change the order of the parameters:

      msiexec.exe /i C:\Users\schetry\Downloads\ost38036.msi REBOOTYESNO=No /q /l* logfile.txt

      Is the modal MSI wizard displayed or is it some "special" custom dialog of this setup?
      • 1. I got it to work, the issue was the installation wizard popped up, but it works now, thanks for the help!

        msiexec.exe /q /l* logfile.txt /i C:\Users\<username>\Downloads\ost3906.msi REBOOTYESNO=No

        2. I'll continue to look in to see if I can see any property to add the Database.

        3. How can I run a silent uninstall?
  • All- How can I have powershell run the silent un-install first wait till it is finished then run the install? After researching I did the below which works, but the blank Notepad window pops up and I had to close it. I don't want the user to get any notepad window when I deploy this to them, simply uninstall and then install thank you.

    Get-WmiObject -Class Win32_Product | Where-Object {$.Name -eq "On-Screen Takeoff"} | foreach- object -process {$.Uninstall()}

    Notepad.exe | Out-Null

    $arguments="/quiet" Start-Process "\<domain>\ROOT\Installs\OnCenter\OST\Testverion3906\ost3906.msi" $arguments
  • UPDATE: I was able to resolve by using the below, thanks.

    Start-Sleep -Seconds 35
Please log in to comment