Kace Script to run an msi not copying the MSI to dependency folder
Hello guys, I have been trying to make this script run for quite a few hours now and at this point, and after googling and browsing ITninja, I am still a little lost.
Here is a screenshot of the script
As you can see this is a pretty simple script that only checks for the software/version not to be present on the pc and in case it is not it runs an msi from the dependencies folder on that pc.
I have isolated the problem to the point where I am almost sure the file is not being copied to the dependencies folder of the pc.
To give more information about this, the targeted pc has a label which points to a replication point and that replication point works ok for managed installations.
A part from this question I have another one, are replication points used to copy dependencies? or is the file always copied from the appliance?
PD: I know this can be done with a managed installation and actually I have one already in place but I have still decided to use scripting for single time installations due to the ammount of technicians using our K1000 server.
Any input will be greatly appreciated.
8 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
Glaporte
9 years ago
Top Answer
In the end I had worked it around ziping the MSI. I noticed MSI files didn't copy for whatever reason but zip files do, so I'm copying the zip file as a dependency, have the script unzip it, run it, log a message and then delete the dependency folder. That works kinda like a MI but has the benefits of the Run Now from scripts.
Running as: SYSTEM
File does not exist: C:\Program Files\7-Zip\7zFM.exe
Creating process returned non-zero: C:\Windows\System32\msiexec.exe /i C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\141\7z920-x64.msi /qn: (0) The operation completed successfully.
Error Code: 0
Status Code: 1619
Status Log
7-zip 9.20 installation has failed (this is a custom message I added as remediation fail task).
Activity Log
Checking if file exists: C:\Program Files\7-Zip\7zFM.exe
Launching program: 'C:\Windows\System32\msiexec.exe' '/i C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\141\7z920-x64.msi /qn' wait='true' - Glaporte 9 years ago
1. have you verified that the software is in fact not installed after you run this?
2. if so what happens when you run the following command manually?
C:\Windows\System32\msiexec.exe /i C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\141\7z920-x64.msi /qn - htomlinson 9 years ago
2. I also tried to run that command and it didn't work. Basically it had no output so I went to C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\141 and found out that 7z920-x64.msi was not there. Therefore the title of my question, looking at it, it may not be as clear as it sounded when I worte it hehe... - Glaporte 9 years ago
one detail is that folder 141 is created but the msi is not in the folder. - Glaporte 9 years ago
So I thought maybe using scripts with run now and real time reporting could do the trick on having the deploy field more organized.
If you can come up with a good way to keep that tidy using MIs your input will be more than appreciated. - Glaporte 9 years ago
msiexec.exe /i 7z920-x64.msi /qn
I have noticed in the past that downloaded msi's in scripts get deleted. - rick07 9 years ago