| Previous | Next |
Supporting Windows "Add or Remove Programs" Control Panel and building an Uninstaller
This sample demonstrates how to support the Windows "Add or Remove Programs" Control Panel and how to uninstall your application.
To add support for the "Add or Remove Program" Control Panel add a key for your product to the Windows Uninstall Registry -- i.e. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"+yourProductName.
The "Add or Remove Program" Control Panel requires the key to include DisplayName and UninstallString values. Windows XP supports the additional values of Publisher, Display Version, HelpLink, and URLInfoAbout.
DisplayName is string shown for your application in the "Add or Remove Program" list. The UninstallString is the DOS command run when the user clicks the "Change/Remove" button in the program's list item. This sample application will uninstall itself when launched with a "/u" argument so the UninstallString consists of the full path to the application plus the "/u" flag. When the application runs it checks to see if it was launched with a "/u" command line argument using the mApplication.getArguments().
The additonal option items Publisher, Display Version, HelpLink, and URLInfoAbout are shown on XP when the user hits the "click here for support information" link.
Two other key methods used in this sample are mApplication.getMyPath() and mApplication.deleteSelf().
The method mApplication.getMyPath() returns the full path include the filename of the exe itself. This command is used to construct UninstallString value.
The mApplication.deleteSelf() designates the application for removal on reboot to complete the uninstall process. This command will also delete the applications containing folder if no other files (besides the exe) are found.
You can download this sample, "Uninstaller", from the mProjector Samples page -- /software/flash-projector/flas.html#uninstaller.
| Questions or Feedback? | Previous | Next |
- AS2 Migration
- Getting Started - Flash
- Debugging in Flash
- Building your application from inside Flash
- Getting Started - Flex
- Debugging in Flex
- Using mProjector - Compile Your SWF into an Appli
- Customizing The About Window
- Debugging Your Application
- Launching Application at Startup
- Mac vs. Windows Application Development
- Menus
- Dynamic Window Creation
- Application Basics
- mProjector Class Basics
- Add Remove Programs Control Panel
- Fullscreen and Center
- Check Connection and Download File
- Choose Files
- Creating an Installer
- Creating and Controlling Multiple Windows
- Cut, Copy, and Paste (Windows)
- Desktop Shortcut and Start Menu Support
- Drag and Drop Files
- Embedding HTML and other Media types
- Flash-Shaped Windows
- Message Box
- Open Documents
- Project Files
- Reading and Writing to Hard Drive
- Startup Application
- Wallpaper and Screensaver
- Window to Window Communications
- Working with Included Files
- Context Sensitive Menus
- Alert User
- Screen Resolution
