‎11-19-2021 09:13 AM
Solved! Go to Solution.
‎11-19-2021 04:08 PM
Naksu wrote:
Hi,
We just recently moved to Lansweeper and now we are doing the firsts deployment packages. We wanted to upgrade Firefox and noticed there is so many different versions: three different languages version and two more with ESR. At the moment we don't want to limit which languages the users use but it should be the latest version. Now when we search for Firefox we got 12 different items, so there are a plenty of old versions too.
We have created a deployment which basically check if HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\CurrentValue has a value en-US (or de, or us-GB, ESR en-US, ESR de) and then continues to correct installation. Question is, can we (how) to create wildcard for different version value, like * en-US? Already tried *, %, && but no luck. The deployment works nicely when there is a new condition with exact value, like: 63.0.3 (x64 de)
Of course when everything is the latest version we can easily use the whole value and we can do it manually for the first time, but this is not the only case. We have several similar situation before our systems are up to date...
Any help would be appreciate!
$location = 'HKLM:\SOFTWARE\Mozilla\Mozilla Firefox\'
$languageExists = $false
$languageExists = (Get-ItemProperty $location).PSObject.Properties.Name -contains "Language"
IF ($languageExists -eq $true) {
Remove-ItemProperty -Path $location -Name 'Language'
}
$language = Get-ItemProperty $location | select-object 'CurrentVersion' -ExpandProperty 'CurrentVersion'
$language = $language.Split("{()}",3)[1]
New-ItemProperty -Path $location -Name 'Language' -Value $language -PropertyType 'String'
‎11-22-2021 12:17 PM
‎11-22-2021 08:43 AM
‎11-22-2021 09:29 AM
Naksu wrote:
Thank you for your replies.
I'm not familiar with VBS scripts so that probably won't work out. How can I use this Powershell script as a condition? I run it on my computer and got the nice results telling which language I have, but I don't have no idea how to implement that to Lansweeper.
Thank you for the reply!
‎11-19-2021 04:08 PM
Naksu wrote:
Hi,
We just recently moved to Lansweeper and now we are doing the firsts deployment packages. We wanted to upgrade Firefox and noticed there is so many different versions: three different languages version and two more with ESR. At the moment we don't want to limit which languages the users use but it should be the latest version. Now when we search for Firefox we got 12 different items, so there are a plenty of old versions too.
We have created a deployment which basically check if HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\CurrentValue has a value en-US (or de, or us-GB, ESR en-US, ESR de) and then continues to correct installation. Question is, can we (how) to create wildcard for different version value, like * en-US? Already tried *, %, && but no luck. The deployment works nicely when there is a new condition with exact value, like: 63.0.3 (x64 de)
Of course when everything is the latest version we can easily use the whole value and we can do it manually for the first time, but this is not the only case. We have several similar situation before our systems are up to date...
Any help would be appreciate!
$location = 'HKLM:\SOFTWARE\Mozilla\Mozilla Firefox\'
$languageExists = $false
$languageExists = (Get-ItemProperty $location).PSObject.Properties.Name -contains "Language"
IF ($languageExists -eq $true) {
Remove-ItemProperty -Path $location -Name 'Language'
}
$language = Get-ItemProperty $location | select-object 'CurrentVersion' -ExpandProperty 'CurrentVersion'
$language = $language.Split("{()}",3)[1]
New-ItemProperty -Path $location -Name 'Language' -Value $language -PropertyType 'String'
‎11-19-2021 03:58 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now