Scripting Question

Bat file works manually but not from Kace

03/24/2015 3705 views
I have a bat file that install SecureZIP 14.00.0032, activates it, doesn't install the desktop shortcut as well as some other switches.
Thing is, when you run the bat file from the good ole double click. It is installs and everything is great. But when I zip it up, upload it to Kace and have it run the silent.bat file from the zip file. It doesn't work.
I have Override Default Install checked
Full Command line: silent.bat
and Don't prepend msiexec.exe checked.

Here is my bat file: sz140032ene64.exe /S /v"/qn PKDESKTOP=0 LICENSE_KEY=******************* PK_NO_CERT_REQUEST=1 PK_KEY_BACKUP=0"

I have also tried leaving Default installation checked and typing in all the switches there but still does not work.

Anyone have some suggestions or advice?

Answer Summary:
5 Comments   [ + ] Show comments


  • Did you change the Execution to something other than "Disabled", which is the default setting?
    • Yes, the Execution is set to Anytime. I add my test PC to the Devices list and after it checks in, the status says Not Installed (1 of 3 attempts) and has stayed there for well over an hour.
  • What is your deployment window time? Something changed in a recent release and having the start and end times at 00:00 no longer works. You have to select 00:00 (+1 Day) for a 24 hour time window
    • My start time is 00:00 and end is 00:00 (+1 day)
      • I'm reaching here... Are the Operating Systems you are targeting set as options in the software Inventory record for that product?
  • Yep, Win 7 Pro x64 SP1
  • Does the machine you are targeting show up at the bottom of the MI? If so, what does it say for the status after you attempt a deployment? Also, is the .bat copying to the machine when Inventory runs and not executing or never copying?
    • The status is still at Not Installed (1 of 3 attempts) for almost 2 hours now. How do I check if the machine is getting the files or not?
      • A Managed Install should create a new directory in the location
  • Yes, the zip file, and both extracted files have been downloaded locally to the test machined

Community Chosen Answer

Offhand, I'd guess you are running into issues with the user that the bat is running under.  MIs/kscripts use LocalSystem by default.  When you double click, it's running under whatever account you are logged in with.

You can test this with PSexec: https://support.software.dell.com/k1000-systems-management-appliance/kb/111788

If you need credentials to run the .bat, switch to an online kscript and use the runas function.
Answered 03/24/2015 by: jknox
Red Belt

  • I ran the test in your link and it did not complete so it is an issue with the localsystem user running the bat.
    • The localsystem account does not have a profile so lacks a desktop folder. You might also try adding ALLUSERS=1 to the msi commands so that the application installs for all users - assuming ALLUSERS is not already set to 1 in the internal MSI.
      • The install is not a MSI file. It is an exe. I tried extracting it with winrar but did not have an option.

All Answers

Are you sure it's not an MSI?  The switch /qn is specific to MSI installs, and also the property values are in the MSI format of all uppercase.  Open task manager and sort on the process name. Then run the install and watch for additional instances of msiexec.exe starting up.
Then check in c:\windows\installer for a newly cached MSI file with the date and time of the install....
Answered 03/25/2015 by: EdT
Red Belt

  • After starting the install, I watched the install shield running and it said "Extracing SZ140032enex64.msi". If I cant get winrar to extract the msi, what can I use?
    • Scratch that. I just let the install shield sit while I went and found the msi file. Hopefully this will fix my issue.
      • That's pretty much the generic approach - don't need to waste time with winrar when running the exe until the first dialog appears will generally allow you to harvest the MSI from the temp folder. So clearing the temp folder before you start will save a lot of hunting!
Thank you EdT. Found the MSI file, changed up my bat to reflect that and it worked like a charm.

Thank you all for you help!
Answered 03/25/2015 by: Thomas86
Senior White Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ