/build/static/layout/Breadcrumb_cap_w.png
07/17/2018 498 views
I'm trying to install a setup.exe via a batch file. Batch file also adds a registry key which works but the software is not installing. I can run the batch file locally on the machine and it works. This is how the batch file reads

@echo off
.\setup.exe /s /v/qn (I have tried it without .\ and it didn't work either)
 rem  set __COMPAT_LAYER=RunAsInvoker  
 REGEDIT.EXE  /S  "%~dp0\code.reg

setup.exe is not working but it does run the code.reg file. 
This is how I have distribution setup. 

Zip file contains, setup.exe, setup.bat and code.reg

T8WnIS.jpeg
1 Comment   [ + ] Show comment

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.
  • You can convert the .bat file on a .exe And execute it with Manage Install

All Answers

0
Check "Don't prepend msiexec.exe" and remove .\ in front of setup.exe
Answered 07/18/2018 by: c.castellari
Orange Senior Belt

0
I have no idea about the KACE stuff, and i suspect that's not your 'real' code (since REGEDIT wouldn't work without the end quote), but I'd suggest you need:

1.  The full path to the setup.exe:
"%~dp0\setup.exe" /s /v/qn

2.  A quote at the end of the regedit command:
 REGEDIT.EXE /S "%~dp0\code.reg"

(....but that's all just a guess)

Answered 07/18/2018 by: captain_planet
Black Belt

0
The box for "Don't prepend msiexe.exe" needs to be checked.
If you leave that box unchecked, Kace will try and run your batch script using the msiexec.exe installer. Since you're running a .bat file and not a .msi file, this is going to cause problems.
Answered 07/18/2018 by: pbrandvold
Orange Belt

  • That didn't resolve the issue. I found when I deploy via script, I can install it using Windows Run As "logged in User" instead of local system. Not sure if that's a software issue or kace issue I wish distribution had Windows run as option.
    • Are you having trouble with any other packages? It might be a bad password saved for your local system password in Kace.
      • Second part of the script works though. code.reg executes and imports the key in to registry so I would assume the password is working. Though I have not deployed any other programs via kace in a while.
0
The KACE agent works as 32Bit binary using the SYSTEM service.
If you run it manually it works on the context fo the machine (32 or 64 bit) and under the user which is logged in. if the setup needs another user and especially the registry is trying to go to 64Bit or HKLM_LU or similar, this is not possible.
You can use scripting and run it under another user.
Answered 07/18/2018 by: Nico_K
Red Belt

0
You can convert the .bat file on a .exe file and execute it with a Manage installation.
Answered 10/05/2018 by: Drosses
White Belt