PocketPC Toolkit.com
PocketPC Toolkit.com


"Only install once" option

One of our biggest challenges during the development of PocketPC Installer has been the constant struggle to keep our application as easy-to-use as possible, but work within the limitations and problems built into your PDA and it's operating system.

One of these problems has been with the automatic launching of the autorun.exe files.

 

An analogy

On your PC, when you insert your Office Installation CD into your CD-drive, a few seconds later, you'll see the familiar Installation program. Crucially, this only happens when you insert the CD into your CD-drive. If you leave the CD in your CD-drive, Windows won't try to re-run the Installation program when you next turn on your PC or if the PC is "woken up" out of the Idle state.

In theory, when you place an autorun.exe in an appropriate directory on your memory card and insert it into your Windows Mobile PDA, you should see the same sort of behaviour. The autorun.exe will be launched, but just that one time you insert the card into the device.

Unfortunately, on some (if not most) devices, this doesn't happen.

 

Often, a device will also attempt to run the autorun.exe file when it is turned on, or when it comes out of the Idle state. Do you really want to see your PocketPC Installer installer file starting to run each time you turn on your device in the morning, and have to jump on the Cancel button to stop it from trying to reinstall everything again ?

No, neither do we.

 


To get around this problem, we added the "Only install/copy the files ONCE" option.

If you tick this box, then when your PDA installer has completely finished running once on your device, it'll make a note of this autorun.exe's creation date/time.

If you try to re-run this copy of your autorun.exe on this device, then it'll silently abort.

 

Good news and bad news

So, the good news is that we've met our objective.

With this "install once" option enabled, once you have run the PDA installer once on a particular device, it won't let you do it again.

If your device does incorrectly start running your PDA installer when your device is turned on, well, you won't actually notice.

The PDA installer will silently start to run (there's nothing we can do about this !), but it'll quickly realise that it's already been run on this device, and will quietly abort. No messages will appear on your device, and you'll probably not even realise that anything's happened.

The bad news is that this functionality gets built into your PDA installer file, and if you did want to re-run that installer file on the same device, there isn't an easy way to do this.

 

Check the log file

Whenever your PDA installer file runs on your device, we update the \installer.txt log file. If you are trying to run an autorun.exe file, but find that nothing's happening when you click on the file in File Explorer, you can look at this log file to find out what's happened.

If you have built your PDA installer file with the "Install once" option ticked, then you will see one of two messages in your \installer.txt log file.

If your PDA installer hasn't previously been run on this device, then your PDA installer file will run, and your log file will contain a message like this (the fourth line is the important one !) :

12/1/2008 13:15 : The "Only-run-once" option has been turned on for this installer. Have we run this .exe before ?
12/1/2008 13:15 : Date/time of this .exe: (\autorun.exe): 12/1/2008 18:15
12/1/2008 13:15 : Date/time of the last installer .exe run on this device: 11/6/2007 20:07
12/1/2008 13:15 : This copy of autorun.exe has not been run on this device - we DO need to run it.

However, if you (or your device) try to run the PDA installer file on your device a second time, then you'll see something like this:

12/1/2008 13:15 : The "Only-run-once" option has been turned on for this installer. Have we run this .exe before ?
12/1/2008 13:15 : Date/time of this .exe: (\autorun.exe): 12/1/2008 18:15
12/1/2008 13:15 : Date/time of the last installer .exe run on this device: 12/1/2008 18:15
12/1/2008 13:15 : This copy of autorun.exe has already been run on this device - we don't need to run it again.

.... and you'll see that your PDA installer file doesn't appear to run.

 

Disclaimer

We'll say it again.. this is a workaround to get around a fault on the PDA, not on our software !

If, in the future, all devices did only run the \Storage Card\2577\autorun.exe file when a memory card was physically inserted into a device, then there'd be absolutely no reason to tick this "Only install once" checkbox.

Unfortunately, at the moment, many devices do have this fault, so it is a useful option to be aware of.

 

Manual override

If you really do need to re-run your PDA installer file more than once on your device, then you should remove the InstallerDate registry value on your device, stored at: HKLM\Software\PocketPCInstaller.

The usual disclaimers apply: if you don't understand what this means, or what the registry does, do not use this method!

Alternatively, simply don't tick the "Install once" checkbox, or rebuild a new copy of your PDA installer file using PocketPC Installer. Although it'll be identical to the original autorun.exe file, it'll have a different creation date, so will run (once) on your device.

 

Back to FAQs