Sign in to follow this  
Followers 0
Andre Celie

Help Needed With A Script

3 posts in this topic

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 file

UninstallerWithIniFile.au3

Share this post


Link to post
Share on other sites



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)

#)

Share this post


Link to post
Share on other sites

Thank you very much for this option, saves me al lot of extra lines, just need 1 now.

It works

Share this post


Link to post
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
Sign in to follow this  
Followers 0