how to launch application automatically after installing CAB file?

K

Khanh

hi all,

Here is other question : can someone know how to config PocketPC INF
file to launch application automatically after installing?
Currently our app have a mechanism of automatically update new
version of program based on a third ap InstallHelper. Our psuedo-code
here:

Exit application
Start process("\My Documents\InstallHelper.cab")
While Not (Exists InstallHelper.exe
Sleep(10000)
End While
Start process (InstallHelper.exe)

Our App is hung forever in WHILE loop if user click "Cancel" for
installing InstallHelper.cab file !!!!!!

Is there any work-around method? I intend to find out the way of
launching InstallHelper.exe automatically after installing
InstallHelper.cab, so that we can remove WHILE loop, but I don't know
how.

Any help would be appreciated.

Khanh
 
I

Ilya Tumanov [MS]

If you mean launching something after CAB file has been unpacked, that
can't be done from INF file. You can use custom setup DLL to do it.

Please see this sample:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/SP_AMO/html
/Custom_Setup_dll_Template_for_a_ROM_Update_File_VXOK.asp

This also might be helpful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/ht
ml/cerefInstall_Exit.asp

Note: setup DLL has to be native.

As to automatic update, you need:

1. Download updater (separate exe).
2. Start the updater.
3. Terminate your app (or updater can terminate the app).
4. Updater downloads and installs the CAB.
5. Updater starts the app (and terminate).
6. Updated app deletes the updater.

You need the updater because you can not update the app while it's running.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top