Jump to content

Recommended Posts

Posted

I have an ini file like this

section

key=1

The 1 stands for installation done. How do i create a script that will read the ini file and if it finds the number 1 it terminates the installation but if the number 1 is not there it does the installation and then sets number 1 when the installation is done....

thank u for your help

Posted

Maybe...

If IniRead("MyFile.ini", "Section", "Key", 0) = 1 Then
    MsgBox(0, "Sorry", "The program was already installed    ", 10)
    Exit
Else
    IniWrite("MyFile.ini", "Section", "Key", 1)
    MsgBox(0, "Great", "The program will now be installed    ", 10)
    ; install
EndIf

8)

NEWHeader1.png

Posted

Maybe...

If IniRead("MyFile.ini", "Section", "Key", 0) = 1 Then
    MsgBox(0, "Sorry", "The program was already installed    ", 10)
    Exit
Else
    IniWrite("MyFile.ini", "Section", "Key", 1)
    MsgBox(0, "Great", "The program will now be installed    ", 10)
    ; install
EndIf

yes that worked like charm thanks for helping me, really appreciate it

8)

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
×
×
  • Create New...