/build/static/layout/Breadcrumb_cap_w.png

How can I use "verify" in a manner similar to "Or"?

I'm quite new to KACE, so forgive me if my question seems a bit dull. I'm making a Windows Online Kscript and have run into a snag. This script will be pushed out only to users running MS CRM, so I decided to add a check for that in the beginning of the script. I used a "Verify" checking for a directory of "C:\Program Files\Microsoft Dynamics CRM" which is all good and fine, but I need to ALSO add one that checks for "C:\Program Files (x86)\Microsoft Dynamics CRM". My problem seems that once the script sees there isn't the first directory, it stops the script. 

I've thought perhaps tweaking the "On Failure" option to Continue might work, but then I'm afraid the script will either fail after not finding the x86 directory even when the first directory is present, OR that it will continue on and run the script without the presence of CRM which is not the intention at all. Hopefully this is making sense... basically what I want to say via the KACE Script is, "If Directory1 = true OR If Directory2=true THEN execute the rest of my script ELSE stop"

2 Comments   [ + ] Show comments
  • Can you use remediation? For example, verify that C:\Program Files\Microsoft Dynamics CRM exists, on success perform task. In remediation verify that C:\Program Files (x86)\Microsoft Dynamics CRM exists? - chucksteel 7 years ago
  • In my KACE, Verify commands are not available in Remediation. Do you know of a way to do this? - JTaff 7 years ago

Answers (4)

Posted by: SMal.tmcc 7 years ago
Red Belt
4
create a smart label for machines having MS crm installed and use that smart label under deploy for the machines to push to in your script.




Comments:
  • For now this seems the way to go... - JTaff 7 years ago
    • another choice is to create a if/then batch file and add that as a dependency and call that.

      http://ss64.com/nt/if.html - SMal.tmcc 7 years ago
Posted by: SMal.tmcc 7 years ago
Red Belt
2
CIR Method


smart label Outlook Bitness Key x86

smart label Outlook Bitness Key x64



Comments:
  • That's pretty damn genius... I will definitely have to try that! - JTaff 7 years ago
    • I am one of those that likes to live outside the box so I am very creative. Been using Kace for over 7 years and have worked on PC's since 79 and every windows version since windows/286 - SMal.tmcc 7 years ago
      • Quick question: Could I add a second CIR in there for Office 2010 since the path to Bitness is 14.0 for that value? - JTaff 7 years ago
      • I did not have that version installed on my machine so I used the version I have. You can create cir for each version of the key and use an "or" function in the smart label between lines

        CIR outlook bitness key 2010
        RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Office\14.0\Outlook, bitness, text)

        CIR outlook bitness key 2013
        RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Office\15.0\Outlook, bitness, text)

        CIR outlook bitness key 2016
        RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Office\16.0\Outlook, bitness, text) - SMal.tmcc 7 years ago
      • I agreed the multiple CIR approach would be awesome, but when I did that I got some unexpected results. When I only searched for those using CRM I got 43 users, however, when adding the custom CIR fields, checking for both x64 and x86 separately only yielded 11 results. Odd, huh? - JTaff 7 years ago
      • they need to do an inventory to show up. - SMal.tmcc 7 years ago
      • Cir's run during the inventory so of will take a couple of cycles to fully populate - SMal.tmcc 7 years ago
      • I have something interesting going on today. I definitely see it's picking up more machines now. However, it's also picking up computers that don't even have CRM installed, even though I have that and bitness separated by an AND condition. I have the CRM title as a software title condition containing the full name... do you think I should set it for EXACTLY or something more precise? I can't figure out why this would happen. - JTaff 7 years ago
      • to avoid confusion can you give me more details in another answer what "it's" is. provide screen shot if possible - SMal.tmcc 7 years ago
    • Even when I use "test"? That seems to populate other things without issues. - JTaff 7 years ago
      • you can force an inventory to see if that does it. could also be on 64 bit machines an x86 install will tend to put it's files in
        [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook]
        "Bitness"="x86" - SMal.tmcc 7 years ago
    • Awesome! I see them starting to populate! This might really do the trick, I'll check back tomorrow... - JTaff 7 years ago
      • I use cirs to run commands sometimes when I want them to follow the inventory schedule vs a script schedule. You should look at a couple of my blogs from when I taught the lessons from the field class at dell world in 2014 - SMal.tmcc 7 years ago
      • Sure. Done! - JTaff 7 years ago
Posted by: JTaff 7 years ago
Senior White Belt
1
Sorry this replies were just not stacking the way I wanted them too. lol
Posted by: SMal.tmcc 7 years ago
Red Belt
0
You can make 2 scripts one for x86 machines and one for x64 machines.  I have done this for a couple of things, sometime this method is less hassles.

gKBBu0.jpeg
WnfViA.jpeg
1oCiq1.jpeg

Comments:
  • My thought process was similar however the issue is slightly more complex as I need scripts for different BIT versions of Microsoft Office, not necessarily machines. The only solid way I have found to discover this is with the Bitness registry value, but I have not seen a way to use any such thing in Smart Labels. - JTaff 7 years ago
    • create a CIR for that registry value and tie a smart label to it - SMal.tmcc 7 years ago

Don't be a Stranger!

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

Sign up! or login

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