Guest bretto Posted April 14, 2005 Report Posted April 14, 2005 Hi All I thought I might share some info on creating a custom setup dll which can be used when deploying your applications. All this info is available out there but in many different places. From whitepapers to web sites and microsoft. I thought I might try and bring it together in easy to understand terms to help make the next developers life a bit easier. You are all probably aware of the cab files that can be used to install software on the pocketpc but you may not be aware that cab files can have a custom setup dll associated with them that can automate installation and removal tasks. For example you may wish to install a new today plugin and have it automatically displayed on the today screen after install or you may wish to allow removal of a today plugin software without the user having to deselect it from the today screen. We have all seen the "Cant remove xyz.dll as it in in use..." message. You might even require a soft reset. Well this can be done by using a custom setup dll. The custom setup dll is automatically used by the cab installer if it is included in the cabs inf settings. I wont go into all the settings for the cab inf file in this post. Maybe another. The inf settings are as follows... You must include the directory to get the setup dll from in the SourceDisksNames area ... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksNames.PPC2003_ARM] ; ARM-specific files for Pocket PC 2003 1 = ,"PPC ARM Files",,..\ARMV4Rel ; relative path "ARM_bins" 2 = ,"Setup",,..\Setup\ARMV4Rel ; relative path to setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; And the name of the setup dll in the SourceDisksFiles area... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksFiles] ; CPU-independent files "mytoday.dll" = 1 ; the main today program file "Setup.dll" = 2 ; custom setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; In the DefaultInstall you will need the following special tag. It tells the cab installer that we have a custom setup dll that needs to be used at install and removal. ;;;;;;;;;;;;;;;;;;;;;;;;;;; [DefaultInstall] CopyFiles = Files.InstallDir CESetupDLL=Setup.dll ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; Thats it for the cab inf file. You do not have to nominate the setup.dll to be installed to the ppc as you would other files. The dll will be used by the cab installer at install time and also at removal time automatically. There is no more intervention required by us. There are 4 standard functions within the setup dll that the cab installer can use. 1 for before installation, 1 for after installation, 1 for before removal and 1 for after removal. ////////// // function is run before installing app // codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) ////////// // function is run after installing app // codeINSTALL_EXIT Install_Exit( HWND hwndParent, LPCTSTR pszInstallDir, WORD cFailedDirs, WORD cFailedFiles, WORD cFailedRegKeys, WORD cFailedRegVals, WORD cFailedShortcuts ) ////////// // function is run before removing app // codeUNINSTALL_INIT Uninstall_Init( HWND hwndParent, LPCTSTR pszInstallDir ) ////////// // function is run after removing app // codeUNINSTALL_EXIT Uninstall_Exit( HWND hwndParent ) You simply do whatever you require for you application at the point you need to. For simplicity and understanding rather than describing all the parts of the custom setup dll I have attached an evc++ project shell for a custom setup.dll. There are a couple of examples in there that might help. Auto refreshing of today screen for installation and removal and some commented code for soft resetting. I hope this can help shed a bit of light on this subject for you. Cheers Bretto Sample project - Setup.zip
Guest snowman Posted May 4, 2005 Report Posted May 4, 2005 bretto, I've installed eVC++ 4.0 Sp4. What SDK do I need to install to create a custom setup dll? Standard Software Development Kit Pocket PC 2003 SDK Please understand that I am new to all this. TIA! Hi All I thought I might share some info on creating a custom setup dll which can be used when deploying your applications. All this info is available out there but in many different places. From whitepapers to web sites and microsoft. I thought I might try and bring it together in easy to understand terms to help make the next developers life a bit easier. You are all probably aware of the cab files that can be used to install software on the pocketpc but you may not be aware that cab files can have a custom setup dll associated with them that can automate installation and removal tasks. For example you may wish to install a new today plugin and have it automatically displayed on the today screen after install or you may wish to allow removal of a today plugin software without the user having to deselect it from the today screen. We have all seen the "Cant remove xyz.dll as it in in use..." message. You might even require a soft reset. Well this can be done by using a custom setup dll. The custom setup dll is automatically used by the cab installer if it is included in the cabs inf settings. I wont go into all the settings for the cab inf file in this post. Maybe another. The inf settings are as follows... You must include the directory to get the setup dll from in the SourceDisksNames area ... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksNames.PPC2003_ARM] ; ARM-specific files for Pocket PC 2003 1 = ,"PPC ARM Files",,..\ARMV4Rel ; relative path "ARM_bins" 2 = ,"Setup",,..\Setup\ARMV4Rel ; relative path to setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; And the name of the setup dll in the SourceDisksFiles area... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksFiles] ; CPU-independent files "mytoday.dll" = 1 ; the main today program file "Setup.dll" = 2 ; custom setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; In the DefaultInstall you will need the following special tag. It tells the cab installer that we have a custom setup dll that needs to be used at install and removal. ;;;;;;;;;;;;;;;;;;;;;;;;;;; [DefaultInstall] CopyFiles = Files.InstallDir CESetupDLL=Setup.dll ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; Thats it for the cab inf file. You do not have to nominate the setup.dll to be installed to the ppc as you would other files. The dll will be used by the cab installer at install time and also at removal time automatically. There is no more intervention required by us. There are 4 standard functions within the setup dll that the cab installer can use. 1 for before installation, 1 for after installation, 1 for before removal and 1 for after removal. ////////// // function is run before installing app // codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) ////////// // function is run after installing app // codeINSTALL_EXIT Install_Exit( HWND hwndParent, LPCTSTR pszInstallDir, WORD cFailedDirs, WORD cFailedFiles, WORD cFailedRegKeys, WORD cFailedRegVals, WORD cFailedShortcuts ) ////////// // function is run before removing app // codeUNINSTALL_INIT Uninstall_Init( HWND hwndParent, LPCTSTR pszInstallDir ) ////////// // function is run after removing app // codeUNINSTALL_EXIT Uninstall_Exit( HWND hwndParent ) You simply do whatever you require for you application at the point you need to. For simplicity and understanding rather than describing all the parts of the custom setup dll I have attached an evc++ project shell for a custom setup.dll. There are a couple of examples in there that might help. Auto refreshing of today screen for installation and removal and some commented code for soft resetting. I hope this can help shed a bit of light on this subject for you. Cheers Bretto Sample project - Setup.zip <{POST_SNAPBACK}>
Guest bretto Posted May 4, 2005 Report Posted May 4, 2005 bretto, I've installed eVC++ 4.0 Sp4. What SDK do I need to install to create a custom setup dll? Standard Software Development Kit Pocket PC 2003 SDK Please understand that I am new to all this. TIA! <{POST_SNAPBACK}> Hi snowman Should just need the evc++ standard sdk, sp3 (or later) + Pocket PC 2003 SDK. I would also get the wm2003se sdk update also although you dont need it for the setup dll.
Guest KevinVernon Posted November 17, 2005 Report Posted November 17, 2005 Hi All I thought I might share some info on creating a custom setup dll which can be used when deploying your applications. All this info is available out there but in many different places. From whitepapers to web sites and microsoft. I thought I might try and bring it together in easy to understand terms to help make the next developers life a bit easier. You are all probably aware of the cab files that can be used to install software on the pocketpc but you may not be aware that cab files can have a custom setup dll associated with them that can automate installation and removal tasks. For example you may wish to install a new today plugin and have it automatically displayed on the today screen after install or you may wish to allow removal of a today plugin software without the user having to deselect it from the today screen. We have all seen the "Cant remove xyz.dll as it in in use..." message. You might even require a soft reset. Well this can be done by using a custom setup dll. The custom setup dll is automatically used by the cab installer if it is included in the cabs inf settings. I wont go into all the settings for the cab inf file in this post. Maybe another. The inf settings are as follows... You must include the directory to get the setup dll from in the SourceDisksNames area ... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksNames.PPC2003_ARM] ; ARM-specific files for Pocket PC 2003 1 = ,"PPC ARM Files",,..\ARMV4Rel ; relative path "ARM_bins" 2 = ,"Setup",,..\Setup\ARMV4Rel ; relative path to setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; And the name of the setup dll in the SourceDisksFiles area... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksFiles] ; CPU-independent files "mytoday.dll" = 1 ; the main today program file "Setup.dll" = 2 ; custom setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; In the DefaultInstall you will need the following special tag. It tells the cab installer that we have a custom setup dll that needs to be used at install and removal. ;;;;;;;;;;;;;;;;;;;;;;;;;;; [DefaultInstall] CopyFiles = Files.InstallDir CESetupDLL=Setup.dll ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; Thats it for the cab inf file. You do not have to nominate the setup.dll to be installed to the ppc as you would other files. The dll will be used by the cab installer at install time and also at removal time automatically. There is no more intervention required by us. There are 4 standard functions within the setup dll that the cab installer can use. 1 for before installation, 1 for after installation, 1 for before removal and 1 for after removal. ////////// // function is run before installing app // codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) ////////// // function is run after installing app // codeINSTALL_EXIT Install_Exit( HWND hwndParent, LPCTSTR pszInstallDir, WORD cFailedDirs, WORD cFailedFiles, WORD cFailedRegKeys, WORD cFailedRegVals, WORD cFailedShortcuts ) ////////// // function is run before removing app // codeUNINSTALL_INIT Uninstall_Init( HWND hwndParent, LPCTSTR pszInstallDir ) ////////// // function is run after removing app // codeUNINSTALL_EXIT Uninstall_Exit( HWND hwndParent ) You simply do whatever you require for you application at the point you need to. For simplicity and understanding rather than describing all the parts of the custom setup dll I have attached an evc++ project shell for a custom setup.dll. There are a couple of examples in there that might help. Auto refreshing of today screen for installation and removal and some commented code for soft resetting. I hope this can help shed a bit of light on this subject for you. Cheers Bretto Sample project - Setup.zip <{POST_SNAPBACK}>
Guest KevinVernon Posted November 17, 2005 Report Posted November 17, 2005 Hi This post looked like the answer to my frustration with deinstalling a plug in cleanly. Had no problem building a setup.dll, incorporating it in my cab and having it kicked off. It seems however that attempts to open the registry keys under HKLM\SOFTWARE\Microsoft\Today\Items fail with an error 2 (file not found curiously) despite the fact I can enumerate the subkeys of Items and see the keys I am trying to open. Its almost as if the toady screen has the keys open thus preventing further opens. But then you'd expect a failure to open not a failure too find. Any thoughts anyone? Hi All I thought I might share some info on creating a custom setup dll which can be used when deploying your applications. All this info is available out there but in many different places. From whitepapers to web sites and microsoft. I thought I might try and bring it together in easy to understand terms to help make the next developers life a bit easier. You are all probably aware of the cab files that can be used to install software on the pocketpc but you may not be aware that cab files can have a custom setup dll associated with them that can automate installation and removal tasks. For example you may wish to install a new today plugin and have it automatically displayed on the today screen after install or you may wish to allow removal of a today plugin software without the user having to deselect it from the today screen. We have all seen the "Cant remove xyz.dll as it in in use..." message. You might even require a soft reset. Well this can be done by using a custom setup dll. The custom setup dll is automatically used by the cab installer if it is included in the cabs inf settings. I wont go into all the settings for the cab inf file in this post. Maybe another. The inf settings are as follows... You must include the directory to get the setup dll from in the SourceDisksNames area ... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksNames.PPC2003_ARM] ; ARM-specific files for Pocket PC 2003 1 = ,"PPC ARM Files",,..\ARMV4Rel ; relative path "ARM_bins" 2 = ,"Setup",,..\Setup\ARMV4Rel ; relative path to setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; And the name of the setup dll in the SourceDisksFiles area... ;;;;;;;;;;;;;;;;;;;;;;;;;;; [sourceDisksFiles] ; CPU-independent files "mytoday.dll" = 1 ; the main today program file "Setup.dll" = 2 ; custom setup dll ;;;;;;;;;;;;;;;;;;;;;;;;;;; In the DefaultInstall you will need the following special tag. It tells the cab installer that we have a custom setup dll that needs to be used at install and removal. ;;;;;;;;;;;;;;;;;;;;;;;;;;; [DefaultInstall] CopyFiles = Files.InstallDir CESetupDLL=Setup.dll ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; Thats it for the cab inf file. You do not have to nominate the setup.dll to be installed to the ppc as you would other files. The dll will be used by the cab installer at install time and also at removal time automatically. There is no more intervention required by us. There are 4 standard functions within the setup dll that the cab installer can use. 1 for before installation, 1 for after installation, 1 for before removal and 1 for after removal. ////////// // function is run before installing app // codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) ////////// // function is run after installing app // codeINSTALL_EXIT Install_Exit( HWND hwndParent, LPCTSTR pszInstallDir, WORD cFailedDirs, WORD cFailedFiles, WORD cFailedRegKeys, WORD cFailedRegVals, WORD cFailedShortcuts ) ////////// // function is run before removing app // codeUNINSTALL_INIT Uninstall_Init( HWND hwndParent, LPCTSTR pszInstallDir ) ////////// // function is run after removing app // codeUNINSTALL_EXIT Uninstall_Exit( HWND hwndParent ) You simply do whatever you require for you application at the point you need to. For simplicity and understanding rather than describing all the parts of the custom setup dll I have attached an evc++ project shell for a custom setup.dll. There are a couple of examples in there that might help. Auto refreshing of today screen for installation and removal and some commented code for soft resetting. I hope this can help shed a bit of light on this subject for you. Cheers Bretto Sample project - Setup.zip <{POST_SNAPBACK}>
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now