Jump to content
aXz

Identify version

Recommended Posts

Hi,

I have a script that deploys a VPN client. Its just an MSI so the installation is not that hard.

But the we want the script to also identify what version of the software currently is installed on the machine.

The software itself is only named "VPNclient" and not "VPNclient 1.3" in the list of installed applications in control panel.

If I do a search in automate it is really easy to choose what version/versions you want/dont want to see but I do not find the same option in the script building of Automate.

What is your suggestions here?

 

Thanks!

 

 

Share this post


Link to post
Share on other sites

You will find that doing this differently will make your life much easier. Your existing script installs a version of software - good. Rather than building a ton a logic into your script, try the following:

  • [optional] Create a search which returns all machines with VPNClient installed - call it VPNClient-installed or something like this
  • Create a search which returns all machines with vpnclient installed and version<>1.3 - call it VPNClient out of date
  • [optional] Create a search for all machines which do *not* have VPNClient installed and  call it - VPNclient not installed
  • Create a search for the machines which *should* have the vpn client installed - lets says a search where clientname ='abc' or clientname='def'
  • Create a group, set the group autojoin to the above search for machines which *should* have the vpn client installed
  • Open the group and on computers>scheduled scripts add a scheduled script
  • Select your original script to install the vpn client but on the 'apply to' drop down, select the search we created above 'VPNClient out of date'
  • Add another scheduled script, select the same script you wrote above, on the 'apply to' drop down select the 'VPNClient not installed

what you are doing is selecting a group of machines which *should* have the client installed, then running the install script on, and this is important, just the subset of machines in this group which have the vpnclient out of date.

Rather than creating one monster script with a ton of checks for different cases, its easier to create one simple installer and let Automate do the selection work and only run the scripts on the boxes that need it.

Edited by imurphy

Share this post


Link to post
Share on other sites
4 hours ago, imurphy said:

You will find that doing this differently will make your life much easier. Your existing script installs a version of software - good. Rather than building a ton a logic into your script, try the following:

  • [optional] Create a search which returns all machines with VPNClient installed - call it VPNClient-installed or something like this
  • Create a search which returns all machines with vpnclient installed and version<>1.3 - call it VPNClient out of date
  • [optional] Create a search for all machines which do *not* have VPNClient installed and  call it - VPNclient not installed
  • Create a search for the machines which *should* have the vpn client installed - lets says a search where clientname ='abc' or clientname='def'
  • Create a group, set the group autojoin to the above search for machines which *should* have the vpn client installed
  • Open the group and on computers>scheduled scripts add a scheduled script
  • Select your original script to install the vpn client but on the 'apply to' drop down, select the search we created above 'VPNClient out of date'
  • Add another scheduled script, select the same script you wrote above, on the 'apply to' drop down select the 'VPNClient not installed

what you are doing is selecting a group of machines which *should* have the client installed, then running the install script on, and this is important, just the subset of machines in this group which have the vpnclient out of date.

Rather than creating one monster script with a ton of checks for different cases, its easier to create one simple installer and let Automate do the selection work and only run the scripts on the boxes that need it.

Ah thats great! I was thinking of something similar but did not know exactly how to do it.

Will follow your instruction with this one.

Thanks again!

Share this post


Link to post
Share on other sites

Hi,

Looking in to this now.

One question regarding the search for computers that should have VPNclient installed. Is it possible to separate Laptops from desktop in this search from what Automate is able to get from its inventory?

If the computers was divided in a Laptop and Desktop location I guess this should not be that hard but locations in our Automate is set to physical locations (sites) and nothing else.

The search do pick out customer A, B and C but not D-Z. Computer OS is not a server and computer OS should be Windows. Thats how far I got with this search for computer that should have VPNclient installed.

 

Thanks!

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...