/build/static/layout/Breadcrumb_cap_w.png

Running VBS script from verify command

Hello,

 I'm trying to create a script that will run a VB script if the key registry is greater than 9

 

(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, svcUpdateVersion)

I want it to find IE10 and roll it back. silently.

 


1 Comment   [ + ] Show comment
  • I know nothing about KBox scripting but you may need to account for the fact that the registry value being interrogated is a string value. Therefore, it *may* be that any value which isn't "10" - including "11" - would be deemed to be "less than" 10. Also, on my boxes, the string isn't a simple, single figure: it's "10.0.9200.16599", for example. An attempt to coerce that into an integer before a comparison operation has been know to blow up other interpretors! - anonymous_9363 10 years ago

Answers (2)

Posted by: jknox 10 years ago
Red Belt
1

It appears that there may not be a way to roll it back silently: http://www.itninja.com/question/how-to-roll-back-ie10-to-prior-version-silently

http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-do-i-uninstall-ie-10-and-re-install-ie-9-cant/ce7b5d63-27fa-42bc-9e86-4a5c63b01de2?page=2

The verify step would check to see if a condition exists, similar to a custom inventory rule.  It's either true or false.  If true, run your VBS from On Success.  If false, it runs from Remediation.

How to call a VBS in a script: http://www.kace.com/support/resources/kb/article/how-to-call-a-visual-basic-script


Comments:
  • I think it's more wise to create a new software in the inventory, based on a custom inventory rule.
    Then, create a smart label for computers who have this software installed, and use this to uninstall the software.

    To complete the example you were creating :

    Verify a registry value is greater than...
    Key: HKLM\SOFTWARE\Microsoft\Internet Explorer
    Name: svcVersion
    Greater than: 10

    This should work.
    On 64bit systems, you'll want to run

    Verify a registry value is greater than...
    Key: HKLM64\SOFTWARE\Microsoft\Internet Explorer
    Name: svcVersion
    Greater than: 10


    The key = "HKLM\SOFTWARE\Microsoft\Internet Explorer". The value is named "svcVersion", and contains "10" or greater. The actual version number is always bigger than 10 when IE10 is installed : on my W8 it is "10.0.6", which is larger than 10. If you set "larger than 9", you will run the script on all your IE9 installs (IE9 version will be something like 9.z.y.x)





    Another advantage of using my method (creating a software item) : it will work on both 32bit and 64bit clients :
    RegistryValueGreaterThan(HKLM\SOFTWARE\Microsoft\Internet Explorer, svcVersion, 9) OR RegistryValueGreaterThan(HKLM64\SOFTWARE\Microsoft\Internet Explorer, svcVersion, 9)


    On a side-note:


    We block IE10 from Windows update using this command:
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Setup\10.0" /v DoNotAllowIE10 /d 00000001 /t REG_DWORD /f /reg:64

    This will make sure that IE10 does not appear in the available updates. However, if a user downoads IE10 manually, and then installs it, he still will be able to do so. - Magnum_ 10 years ago
Posted by: StockTrader 10 years ago
Red Belt
0

Hello,

 

have you tried in this way?

I've not personally tried it but I think that should work.

 Regards,

Marco - StockTrader

 
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