Posts tagged ‘batch’

Windows CE and Mobile SetupDll with unzip support

SetupDll_Zip

Update 14. sept 2010: fixed source code and template files, please use the new files only

Create windows ce cab files which install a complete directory structure onto a device. I created
this small tool, as I needed an easy to use tool to create a pseudo installation cab.

The DLL will unzip a archiv file with all dirs onto a device. To build a new cab use the directory
structure you will find below cabdir.

Continue reading ‘Windows CE and Mobile SetupDll with unzip support’ »

ActiveSync Scripting

The following is a nice? sample for an automation task. This batch will be executed every time a device connects to your PC via ActiveSync. You will need the itsutils.

As you can read, the batch (script) first tries to check, if it has already been run on the device. This is done by looking for a file called “\OnConnect.done”. In real, the batch deletes a local file (line 13) “OnConnect.done” and then simply copies the file from the device (line16). If the file is found, this device has been already processed (line 17) and the batch gos on with line 66.

If the file is not found, the batch continues with setting the registry changes. It uses saved REG files and the nice tool pregutl to do it remotely (line 22 to 24). After doing the changes, the device will be queried for different registry keys which will be saved to database.txt for later use. The registry keys platform (line 29) and version (line 30) are available on all devices, but OSBuildInfo (line 59) and system (line 48) are only available on CK3x or 7xx.

So in line 33, we try to find the model string for CK3x devices and in line 39 for CN2 devices. In line 43 and 44 we will use the saved model names to jump over the part, that is only valid for PPC (7xx): dump psminfo.txt into database.txt. The OSBuildInfo registry is only been executed for CK3x models.

Finally we put a OnConnect.done onto the device, so we later know, that it was handled. At the very end, we sync the time of the device with the PC.

Continue reading ‘ActiveSync Scripting’ »