WallyWonka
08-18-2008, 08:12 PM
In my project I have it configured so that certain buttons will become visible\enabled when I install the program and the registry entries are present:
is_there = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyApp\\v1.0");
if is_there then
Button.SetVisible("Button1", false);
Button.SetEnabled("Button2", true);
That works great when you set the 'On Click' button properties to:
File.Run("Autoplay\\setup.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");
After a successful installation the buttons will appear with no problems at all. My problem is that I have a Uninstall button in my project and when I successfully remove the app and all it's registry entries, the page does not refresh automatically the same way it would have if I installed it. The buttons stay the way they are even though the registry entries are now gone. I have to close the autoplay application and reopen it for the buttons to display properly. This is not the case when I install it though, it will refresh automatically. I tried this:
File.Run("Autoplay\\Uninstall.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");
Page.Redraw();
Application.SetRedraw(true);
None of those work however, Hope someone can help. Thanks in advance.
is_there = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyApp\\v1.0");
if is_there then
Button.SetVisible("Button1", false);
Button.SetEnabled("Button2", true);
That works great when you set the 'On Click' button properties to:
File.Run("Autoplay\\setup.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");
After a successful installation the buttons will appear with no problems at all. My problem is that I have a Uninstall button in my project and when I successfully remove the app and all it's registry entries, the page does not refresh automatically the same way it would have if I installed it. The buttons stay the way they are even though the registry entries are now gone. I have to close the autoplay application and reopen it for the buttons to display properly. This is not the case when I install it though, it will refresh automatically. I tried this:
File.Run("Autoplay\\Uninstall.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");
Page.Redraw();
Application.SetRedraw(true);
None of those work however, Hope someone can help. Thanks in advance.