goodbyeplanet Posted October 17, 2010 Posted October 17, 2010 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
Valuater Posted October 17, 2010 Posted October 17, 2010 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)
somdcomputerguy Posted October 18, 2010 Posted October 18, 2010 How do i create a script...SciTE, although any other text editor of your choice could be used. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
goodbyeplanet Posted October 18, 2010 Author Posted October 18, 2010 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now