Jump to content

I Am Loss Without Goto Command


Recommended Posts

$ver= 123

$ver1=456

I want the script to read the registry value and the result will be either 123, 456, (different computers has their own version)

or wrong version and no entry at all.

If the result either is 123 or 456, then will skip the installation. If the result is not the correct version or no entry, it will start the installation. After the installation it will go to next statement again. I have no problem using AutoIt v2 goto command to completed above matter. But the AutoIt v3 has removed the goto command. Could anyone give some advise. Thanks

Link to comment
Share on other sites

This might help get you started.

$var = RegRead ( "keyname", "valuename" )
If $var = "123" or $var = "456" Then
    doInstall()
EndIf
;code before script terminates goes here
Exit


Func doInstall()
  ;installation code goes here
EndFunc
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...