Jump to content

Recommended Posts

Posted

Hi folks, I'm trying to automate the Nero General Cleantool, cuz I thought that would be easier than manually (via script) uninstalling each and every component of Nero seperately... it looked simple enough, just five mouse clicks or so and it's done...

But I can't get my script to go past a certain point about half way. The Cleantool will just hang/freeze and have to be forceclosed.

$NeroGeneralCleanTool = 0
$cleantoolDoyoureally = 0
$cleantoolDoyouwant = 0
$cleantoolTheCleanUpprocess = 0

Run("C:\Temp\General-CleanTool_2_1_5_17.exe", @TempDir)

While 1
    sleep(500)
    If WinExists("Browse for Folder") Then ;Nero does not exist
        WinActivate("Browse for Folder")
        ControlFocus("Browse for Folder", "Cancel", 2)
        ControlClick("Browse for Folder", "Cancel", 2)
        WinWait("Nero General CleanTool")
        WinActivate("Nero General CleanTool")
        ControlFocus("Nero General CleanTool", "Exit", 2)
        ControlClick("Nero General CleanTool", "Exit", 2)
        MsgBox(0, "No Nero Software Found", "No Nero products found... please contact your system administrator if this is incorrect.", 5)
        Exitloop
    ElseIf WinExists("Nero General CleanTool") Then ;Nero Exists
                        
            While WinExists("Nero General CleanTool")
                
                Select
                Case WinActive("Nero General CleanTool") ;And $NeroGeneralCleanTool = 0
                    $NeroGeneralCleanTool += 1
                    ;If WinActive("Nero General CleanTool") Then $NeroGeneralCleanTool += 100
                    If $NeroGeneralCleanTool = 1 Then
                        ControlFocus("Nero General CleanTool", "Products to remove:", 1057)
                        ControlClick("Nero General CleanTool", "Products to remove:", 1057)
                        ControlFocus("Nero General CleanTool", "Products to remove:", 1022)
                        ControlClick("Nero General CleanTool", "Products to remove:", 1022)
                    EndIf
                    ;MsgBox(0, "Window Exists", "Nero General CleanTool")
                Case WinActive("cleantool", "Do you really")
                    $cleantoolDoyoureally += 1
                    ControlFocus("cleantool", "Do you really", 6) ;ClassNameNN: Button1 | Text:     &Yes
                    ControlClick("cleantool", "Do you really", 6)
                    ;MsgBox(0, "Window Exists", "cleantool Do you really")
                Case WinActive("cleantool", "Do you want")
                                        ; This is the bit that fails. 
                                        ;The actual cleantool window just sits there, and may eventually disappear, 
                                        ;leaving a broken Nero tool frozen and unresponsive.
                    $cleantoolDoyouwant += 1
                    ;Sleep(500)
                    ControlFocus("cleantool", "Do you want", 6) ;ClassNameNN:   Button1 | Text:     &Yes
                    ControlClick("cleantool", "Do you want", 6)
                    ;MsgBox(0, "Window Exists", "cleantool Do you want is number " & $Counter)
                Case WinActive("cleantool", "The CleanUp process")
                    $cleantoolTheCleanUpprocess += 1
                    MsgBox(0, "Window Exists", "cleantool The CleanUp process is number " & $Counter)
                Case Not WinExists("Nero General CleanTool")
                    ExitLoop
                EndSelect
            WEnd    
            ExitLoop
    EndIf
WEnd

MsgBox(0, "Finished", "Here's the score:" & @CRLF & _ 
                        $NeroGeneralCleanTool & " " & $cleantoolDoyoureally & " " & $cleantoolDoyouwant & " " & $cleantoolTheCleanUpprocess, 4)
Exit

Ok, the msgboxes and the variables are there for debugging purposes only.

You need the cleantool for it to work (http://www.nero.com/nero6/eng/General_Clean_Tool.html) and if you don't put it in c:\temp you'll have to change the Run command, and of course, if you don't have Nero installed the whole process will fail - likewise, if you DO have Nero installed, this will remove it, so be careful!

I've installed Nero about 50 times in the last two days trying to get this to work.

Anyone help?

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
  • Recently Browsing   0 members

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