Scripting Question
installing software via bat file using distrubution
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

1 Comment
[ + ] Show comment
Comments
All Answers
Please log in to answer
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)
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.
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.
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.
Reason: Removed by member request For more information, visit our FAQ's.