Tip of the Month (April 2008) Starting a Desktop Application When a Handheld Connects When you connect a handheld to the desktop, our synchronizer knows to start synchronizing if you have "Synchronize on Connect" turned on. If you want something else done when a connection is made, here's how to set that up. First, it will be helpful to know how we manage to convince ActiveSync (a.k.a. Mobile Device Center) to launch our synchronizer. Our synchronizer is an executable program. It's called VICESYNC.EXE and it is usually installed in C:\Program Files\Windows CE Services\SYWARE Visual CE\VICESYNC.EXE. If you connected the handheld to the desktop, navigated to VICESYNC.EXE on the desktop, and double clicked it, you would notice that the Visual CE synchronizer starts. Convincing ActiveSync to launch us is actually pretty straight forward. Using the registry editor, go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services\AutoStartOnConnect and you will see a string value called VisualCEConect whose value is the full pathname of VICESYNC.EXE. If you want ActiveSync to run your executable, just create another string value (it doesn't matter what it is called) whose value is the full pathname of the executable you want to run. Knowing all this, you can do some clever things. For example:
Of course, to take advantage of all this, you will need the services of a programmer to create the executable to run. If you have someone in house to do this, you are all set. If not, contact us and we'll see what we can do for you. Previous Tips of the Month |