This code sample is named autorun. It demonstrates how to handle autorun notifications when a storage card is either inserted or removed from the mobile device.
- The autorun.exe utility that ships with the Windows Mobile SDK
To run the code sample
Navigate to the solution file (*.sln), and double-click it. By default, the solution file is copied to the following folder:
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\autorun\``autorun.sln
Microsoft Visual Studio 2005 launches and loads the solution.
Build the solution (Ctrl+Shift+B).
Deploy the solution (F5).
To use the application
- The executable must be named "autorun.exe", and you must place it in a processor specific directory (2577) on the storage card.
- When the storage card is inserted, the application will be launched with "install" as its command-line parameter.
- When the storage card is removed, the application will be launched with "uninstall" as its command-line parameter.
This code sample requires a storage card to run.
Pocket PC SDK: Windows Mobile 5.0 Pocket PC SDK.
Smartphone SDK: Windows Mobile 5.0 Smartphone SDK.
Development Environment: Visual Studio 2005.
ActiveSync: Version 4.0.
Send Feedback on this topic to the authors