/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Is it possible to create a "if file doesn't exist" script through the K1000 scripting wizard?

10/23/2015 3985 views
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.
Answer Summary:
2 Comments   [ + ] Show comments

Comments

  • I am not to sure about using the scripting Wizard itself, but if you just create a new Online KScript, then under "Scripting › Scripts › Script Detail" and on the bottom were the tasks are, its usually pretty easy to go through and set it up in the way you are talking.

    If it just isn't working that's another issue that I could try to help with.
  • That is what I meant by wizard, my apologies. The problem is the "Verify" take can only verify that a file exists not if a file doesn't exist.

Answer Chosen by the Author

0
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
Answered 10/24/2015 by: SMal.tmcc
Red Belt

  • 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.
    • 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.
      • This is exactly what I needed. Thank you very much
      • great! could you mark the question answered then, thanks
    • The cir method is more for apps/files without a standard installer.
      • 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

All Answers

1
It looks like you would want to use the Remediation item under a task:

NX6gOTr.png

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.

Answered 10/23/2015 by: aarmington
White Belt

  • I think that this method would be preferred over SMal.tmcc's suggestion, though either would work.
    • 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.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ