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
-
You can convert the .bat file on a .exe And execute it with Manage Install - Drosses 6 years ago
Answers (5)
Please log in to answer
Posted by:
c.castellari
6 years ago
Posted by:
captain_planet
6 years ago
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)
Posted by:
pbrandvold
6 years ago
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.
Comments:
-
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. - sam240 6 years ago
-
Are you having trouble with any other packages? It might be a bad password saved for your local system password in Kace. - pbrandvold 6 years ago
-
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. - sam240 6 years ago
Posted by:
Nico_K
6 years ago
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.
Posted by:
Drosses
6 years ago