Is it possible to create a "if file doesn't exist" script through the K1000 scripting wizard?
I know I can use it to verify a file exists but my main goal would be to check if a file exists, if it doesn't exist "launch this program". If it does exist, do nothing. Is there something I'm missing? Every time I walk through the task steps they just don't seem to be doing what I want them to be doing.
2 Comments
[ + ] Show comments
Answers (2)
Answer Summary:
Please log in to answer
Posted by:
aarmington
9 years ago
It looks like you would want to use the Remediation item under a task:
This is obviously not how you would want to go about installing Chrome, but just to show the functionality.
I was able to test it in both situations, it threw me the notifications so I could check the status along the way.
Comments:
-
I think that this method would be preferred over SMal.tmcc's suggestion, though either would work. - Michael4732 9 years ago
-
the reason to use MI to install software vs script is up to the user. A couple of reasons to use an MI is it will install using the distribution schedule, A script you need to set a schedule and hope the machine is on within that schedule. Using an Mi to install also gives a path to upgrade and uninstall. If more then one tech is using the kbox this also is the standard method you learn. Your predecessors will not have to redo everything to get it to the standard method most everyone else uses. - SMal.tmcc 9 years ago
Posted by:
SMal.tmcc
9 years ago
Top Answer
create a CIR FileExists(the file) load up your program to it then create an MI to distribute the install against the Cir. if it does not exist the install will run if it does exist nothing happens
Comments:
-
Could I create the CIR from a software entry? The "file" is really an installed program. So could I then go to that software entry and assign it the custom inventory label? Sorry for all the questions, I appreciate the help. - dgaliffa90 9 years ago
-
The right way to do what you want is:
If the software does not show in inventory:
1. Manually install the program on a test station with the kace agent on it.
2. Force an inventory on that machine (may take more then one)
3. The newly installed program will show in inventory.
4. Upload your install to that software item
5. Create a MI to install on the rest of the machines. - SMal.tmcc 9 years ago-
This is exactly what I needed. Thank you very much - dgaliffa90 9 years ago
-
great! could you mark the question answered then, thanks - SMal.tmcc 9 years ago
-
The cir method is more for apps/files without a standard installer. - SMal.tmcc 9 years ago
-
You would replace steps 2 and 3 with a Cir that looks for a component of the install. Files and registry entries are easy to create - SMal.tmcc 9 years ago
If it just isn't working that's another issue that I could try to help with. - aarmington 9 years ago