Andre Celie Posted March 28, 2006 Posted March 28, 2006 What I am trying to do is create an uninstaller for my games. I am able to create an Ini files and then read the ini file. But I think it should be possible to do it with less code, can someone help me See attached fileUninstallerWithIniFile.au3
nfwu Posted March 29, 2006 Posted March 29, 2006 Simple: Once you have the INI file ready, use this code: $Progdir = IniRead("C:\settings.ini","GlobalSettings","Progdir", 1) $Uninstallexe = IniRead("C:\settings.ini","GlobalSettings","Uninstallexe", 1) $Switch = IniRead("C:\settings.ini","Switches","Switch", 1) $i = 0 while 1 $i = $i + 1 $GameName = IniRead("C:\settings.ini","GameNames","GameName"&$i, "-=NOT_EXIST=-") If $GameName = "-=NOT_EXIST=-" Then ExitLoop $Uninstaller = $Progdir & $GameName & "\" & $Uninstallexe $UninstallerFinal = $Uninstaller & " " & $Switch If FileExists($Uninstaller) Then RunWait($UninstallerFinal) EndIf WEnd That should work (not tested) #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Andre Celie Posted March 29, 2006 Author Posted March 29, 2006 Thank you very much for this option, saves me al lot of extra lines, just need 1 now. It works
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