Ejemplo n.º 1
0
        private static IntPtr FindUninstallerWindow(string DisplayName)
        {
            Win32Utils w32 = new Win32Utils();
            IntPtr uninstallerWindow = IntPtr.Zero;
            while (uninstallerWindow == IntPtr.Zero)
            {
                uninstallerWindow = w32.SearchForTopLevelWindow(DisplayName + " Maintenance");
                System.Threading.Thread.Sleep(500);
            }

            return uninstallerWindow;
        }
Ejemplo n.º 2
0
        private static IntPtr FindUninstallerOKButton(IntPtr UninstallerWindow)
        {
            Win32Utils w32 = new Win32Utils();
            IntPtr OKButton = IntPtr.Zero;
            while (OKButton == IntPtr.Zero)
            {
                OKButton = w32.SearchForChildWindow(UninstallerWindow, "&OK");
                System.Threading.Thread.Sleep(500);
            }

            return OKButton;
        }