Skip to main content

Installer for Pocket PC Applications

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET >> Installer for Pocket PC Applications Page: [1]
Login
Message << Older Topic   Newer Topic >>
Installer for Pocket PC Applications - 6/12/2003 12:27:45 PM   
Neels

 

Posts: 2
Score: 0
Joined: 4/24/2003
Status: offline
Hi,

Does anybody know of a free tool, other than EZSetup and NSIS, Which can be used to create self-installing, customizable installations for pocket pc applications. Or is there a way of doing it in vs.net 2003. There is an example on MSDN about developing and deploying smart app devices, but its not a walk-through, so I couldnot make my installation work with that code.

I want to customize the installation so that the install set can itself figure out the type of processor and install the necessary cab files and also detect if .net compact framework and sqlce runtimes are installed on the device or not, if not, it should install it first, again using the appropriate processor-specific cab file and then install the application.

Thanks for any help!

Neels
Post #: 1
RE: Installer for Pocket PC Applications - 6/20/2003 1:18:59 AM   
adreanto_s

 

Posts: 34
Score: 0
Joined: 9/7/2002
Status: offline
I also have the some problem.
Please if anyone knows.

Thanks

(in reply to Neels)
Post #: 2
RE: Installer for Pocket PC Applications - 6/23/2003 7:19:07 PM   
rmehta77

 

Posts: 7
Score: 0
Joined: 6/9/2003
Status: offline
I am using e-PocketSetup 2003 from http://www.e-pocketsetup.com/
It' s not really expensive and works really great.

Rakesh

(in reply to Neels)
Post #: 3
RE: Installer for Pocket PC Applications - 6/24/2003 12:00:44 AM   
medey2k

 

Posts: 12
Score: 0
Joined: 6/23/2003
Status: offline
I a new programmer in Pocket Pc development (especially .net cf). I would like to know whether I can have my program running in the pocket pc without using any installer or deployment issues running up (I just want to demo my system to my supervisor and in eVB, the start menu will have the .vb file, so how can I have the same thing in Pocket Pc 2002 with .netcf?) Thank you.

(in reply to rmehta77)
Post #: 4
RE: Installer for Pocket PC Applications - 6/24/2003 12:16:07 AM   
devbuzz


Posts: 457
Score: 0
Joined: 4/26/2002
From: New Jersey, USA & Cape Town, SA
Status: offline
medey2k: check under the Program Files menu and look for your .NET CF app name - you will see the exe there.

As for the rest of you - there is sore need for a .NET CF bootstrap loader that will load the necessary framework components - but that is a non-trivial task.

For general installs we use ezsetup and some custom INF files. We havne' t found a really good out of the box tool which will allow you to WYSIWIG all the things we typically need to do on installs.

_____________________________

Derek Mitchell
http://www.devbuzz.com
Windows Mobile Developer
--------------------------------------
* Share the .NET love when you solve *
* issues by posting your solutions!! *
--------------------------------------

(in reply to Neels)
Post #: 5
RE: Installer for Pocket PC Applications - 7/19/2003 5:23:54 PM   
PDAfreak

 

Posts: 91
Score: 0
Joined: 4/26/2002
From: Canada
Status: offline
I' m really struggling with EZsetup. Do you simply use the inf file the cabwizard makes, or you do need to make some custom ini file?

_____________________________

PDAfreak

http://www.PDAinitiative.com/

(in reply to Neels)
Post #: 6
RE: Installer for Pocket PC Applications - 7/19/2003 6:25:48 PM   
PDAfreak

 

Posts: 91
Score: 0
Joined: 4/26/2002
From: Canada
Status: offline
OMG.. never mind.. I was confusing an inf file with an ini

_____________________________

PDAfreak

http://www.PDAinitiative.com/

(in reply to Neels)
Post #: 7
RE: Installer for Pocket PC Applications - 9/1/2005 12:31:49 AM   
prankster624

 

Posts: 20
Score: 0
Joined: 8/25/2005
Status: offline
quote:

ORIGINAL: Neels

There is an example on MSDN about developing and deploying smart app devices, but its not a walk-through, so I couldnot make my installation work with that code.


Is this what you were talking about?  http://www.microsoft.com/downloads/details.aspx?FamilyId=6B6B700F-9554-4965-91B3-42EC188BB44C&displaylang=en

I downloaded that and have spent way too much time trying to figure out what the heck to do with it.  I finally found the ezsetup program and got that to work, but I'm still looking for a better way to do it.  Does anyone know of a better how-to guide for the msdn example?  I used eVB for a short while and it had a great installation wizard built in.  Is there not anything similar for VB.NET?

(in reply to Neels)
Post #: 8
RE: Installer for Pocket PC Applications - 9/1/2005 3:27:06 AM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
Hello to all,

With as many app's as I have available, I ended up writing my own solution for custom installations.  I wish things were easier, but my current method really isn't that bad overall.  First, I'll point out a few things:
  • I always use the ActiveSync installation method.  That is, my .exe (for each app I have) fires up the Add/Remove programs for ActiveSync.  Then, installation of all cab files is done automatically, through ActiveSync to the Pocket PC.
  • My installations don't check for which O/S is on the Pocket PC.  Instead, I let the user download the appropriate version for their machine.  In other words, they can click on the 2003 link to download for 2003, or click on the 2003SE link to download for 2003SE Pocket PC's.  I don't find this to be too bad, it's easier for me, and not too much harder for the end user.
  • At first, when coming over from eVB, I wrote my own installer (that activated ActiveSync) in VB.NET.  I'm not a C++ programmer by any stretch of the imagination, so I found it very easy to write the installer in VB.NET.  However, I then found out (the hard way), that when the end user attempted the install, errors were encountered because they didn't have the necessary VB.NET files on their PC's (much like the VB6 runtimes needed to run VB6 apps).  So, I ended up re-writing my installer in C++.

OK, now, here's how I acheive success in installations (and it performs very well and professionally for the end user), STEP BY STEP:
  1. First, I of course do my Build (must be done as a Release Build so that the .inf and cab files are created).  The .inf file is located in \obj\Release folder of your Project's folder.  You'll then need to open the .inf and change the "Provider=" line so that it says the name of your company, such as "Provider=Prosurv LLC".
  2. I make two folders inside this release folder.  One I call "2003 inf" and the other I name "2003SE inf".  I then copy/paste the .inf file into each new folder.  This is so that when I re-create the cab files (one for 2003 and one for 2003SE), I can simply go into each folder, grab (copy) the .inf for that installation and paste it back into the \obj\Release folder, so that when I run the BuildCab.bat file, it uses the appropriate .inf that I want it to.  OK, so you've made the two folders and pasted the .inf into each one.  Now, using Notepad, open the .inf file in your 2003 inf folder and change the provider to your company name.  Now save it.
  3. Next, open the inf file that's in your 2003SE folder.  Change the provider.  Now, do one more thing:  Change the version min to 4.21.  This will prevent the popup of the "screen awareness" message on 2003SE devices (when installing your cab).
  4. Now, you have an installation inf file for 2003 and another for 2003SE.  First, copy the one for 2003 back to the \obj\Release\ folder, overwriting the existing .inf.  Double-click BuildCab.bat.  You've now built the cab installation file for 2003 machines.  The cab(s) will be found in the \cab\Release\ folder of your project.  The cab you want "Your Project Name.ARM.CAB" most likely.  COPY THIS CAB to a folder somewhere else.  My desktop is full of folders such as "Ship Pocket Quads.NET 2003".  I paste my CAB file to this folder.
  5. With the 2003 cab out of the way, we'll create the 2003SE cab.  Go back to your \obj\Release\2003SE folder.  Copy the .inf back to \obj\Release\ (Overwriting the existing one).  Remember, this is the .inf that we modified so that it will install "cleanly" on 2003SE machines.  Now, double-click BuildCab.bat once again.  Go to your \cab\Release\ folder and copy the "Your Project Name.ARMV4.CAB" to another folder, once again, I use folders on the Desktop for this.  My example is the "Ship Pocket Quads.NET 2003SE" folder.
  6. Now the fun really begins...below is a screen shot of my "Ship Pocket Quads.NET 2003" folder.  Note that there are 8 files, plus the installer.  4 of the files are my cab installation files.  One of those is my actual application, while the other three cabs are the OpenNETCF, sqlce, and GPSLibCE.  Note that I have renamed the cabs so that they install in a certain order, starting with App1_, then App2_ and so on.  Each cab file requires a Setup.ini file to go along with it.  Setup1.ini contains the info for installing OpenNETCF.  The contents of Setup1.ini are:



[CEAppManager]
Version=1.0
Component=OpenNETCF
[OpenNETCF]
Description=OpenNETCF
CabFiles=App1_OpenNETCF.SDF.PPC3.ARM.CAB

Setup2.ini, Setup3.ini, and Setup4.ini are similar....to be continued...

Dominic





Thumbnail Image


Attachment (1)

(in reply to prankster624)
Post #: 9
RE: Installer for Pocket PC Applications - 9/1/2005 3:50:52 AM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
OK, so let's keep going...

Let's review:
We have the four cab files for installation.  We also have 4 Setup.ini files that correspond to the cab's.  That just leaves the InstallerC4.exe.  This is my personal installer program that I created in VS.NET.  The 'C' stands for the fact that I wrote this installer using C++.  The 4 is an indication to me that this installer will look for 4 Setup.ini files and install them.  I've also re-compiled my Installer for 2, 3, and 5 cab file installations.  It's a simple process of re-Building the Installer.exe program, which I'll go into later.

Let's say you already have a copy of my InstallerC4.exe program.  You could then, at this point, simply zip up the files in this folder (using WinZip or other Zip tool), and be done!  End users could then download your zip file from your web site, extract the files, and double-click the InstallerC4.exe file.  Installation from there is then automatic (via ActiveSync's Add/Remove program screen).  In fact, with my installer, there's just one popup message box that says "Install Pocket Quads.NET 2003 and other pending installations?".  The user just clicks yes, and ALL the cabs are installed automatically.

However, I personally use the WinZip Self-Extractor utility to create an automatically self-extracting .exe.  So, first, I use WinZip to create a .zip file that contains all 9 files (Installer, Setups, and Cabs).  I then right-click this file and select WinZip Self-Extractor.  Using the WinZip program, I walk through the wizard step by step to create the final .exe.  In the end, I wind up with a single, executable file that can be downloaded easily from my web site.  Once downloaded, the user simply double-clicks the .exe, reads the appropriate installation screens, and voila! the installation is complete.  The WinZip Self Extractor utility lets you give it a file name (that's inside your zip file) that will be ran once the .exe is double-clicked.  In other words, my InstallerC4.exe program is automatically ran when the user double clicks my "Pocket Quads.NET 1.7.exe" file.

As I said, though, you don't have to use any WinZip utilities.  You could just have the user double-click the InstallerC4.exe file.  From there, installation is still automatic.

That brings us to the meat of the process...the InstallerC4.exe program...

Dominic

(in reply to domls)
Post #: 10
RE: Installer for Pocket PC Applications - 9/1/2005 4:28:59 AM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
And now for the magic...my InstallerC4.exe program.

OK, it's really NOT magic, and most of the code comes from Microsoft sample code (I can't recall the folder that it's in, in VS.NET 2003).  I highly recommend the book "Microsoft .NET Compact Framework" Core Reference (written by Wigley and Wheelwright).  Chapter 6 is called "Completing and Distributing Your Application" and explains that there's 5 different methods of distributing your app.  Of course, in these posts, I'm covering the ActiveSync distribution method.  This method is covered on pages 218-221 "Deploying Through ActiveSync".

Page 219 of the text contains the Visual C++ code necessary to create installation program.  Per the text..."The following Visual C++ code, from the Setup application in this book's sample files, checks the registry keys...".  So the sample code is readily available.  What the installer does, is it first checks the registry to be sure that ActiveSync is installed on the user's machine, then it gets the path to the Application Manager (this is the Add/Remove program that you see on the screen), and finally it prepares the Setup.ini file to be used as a parameter for the install.  In other words, the Setup.ini file (and path) and passed as a parameter when the installer program executes (launches) the Application Manager program.

From here, the trick was how to get the installer to pass mutliple Setup.ini files in order to execute them cleanly using the Add/Remove program screen.  After a lot of research, I found that the method indicated by Microsoft for concatenating multiple Setup.ini files simply didn't work correctly with the Application Manager.  In other words, there's a bug or something not quite right in the Application Manager for recognizing and executing multiple Setup.ini files.  However, I was able to find a solution that DOES work, and works very well.

What we're all looking for is the 'cleanest' installation possible.  When I tried the examples (for multiple Setup.ini's) as given by the texts...well, unfortunately, it wasn't very clean.  Instead, what I found was that each of the cabs that I was installing would appear in the Add/Remove programs box, with check boxes.  The user was then forced to check all 4 programs for a fully successful installation process.  Of course, what would happen is that the user wouldn't know to install the 3 supporting cab files, and your program would crash.  I can't recall where I read about this method...but needless to say, since it doesn't work....let's move on...

And now the finale...

The key to this whole process is, as I mentioned, the InstallerC4.exe program.  It's really a modified version of the Microsoft Setup program as mentioned above.  So, locate the Setup.sln file and run it.  Open the Setup.cpp file that's in the project.  Now, if you only have 1 cab file to install, you could just Build the .exe (and maybe rename it InstallerC1.exe if you'd like), but I have the feeling that you need to install more than 1 cab file.  So here's the code that you'll need to copy/paste within the Setup.cpp file:
[size=2]
szParams[0] = TCHAR(0);
_tcscat(szParams, TEXT("\""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup1.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup2.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup3.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup4.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup5.ini\""));[/size]


When I Build this project, I wind up with an .exe that's ready to support 5 Setup.ini files.  If I only need 3 or 4, then I just comment out the unneeded lines (in C++ just type in // to comment out each line).  I can then Build for each type of installation I need, whether it be for 1,2,3,4, 5 or more cab files.  So, this is the Holy Grail that we need in order to successfully install multiple cabs to ActiveSync.

The final outcome is that we now have the ability to create a sophisticated, professional installation, and if you don't need or want to use the WinZip self extractor, then this installation process doesn't cost a dime!


Thumbnail Image


Attachment (1)

(in reply to domls)
Post #: 11
RE: Installer for Pocket PC Applications - 9/1/2005 4:35:18 AM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
Here's the final result of all this work...

Hope this helps!

Dominic


Thumbnail Image


Attachment (1)

< Message edited by domls -- 9/1/2005 4:36:13 AM >

(in reply to domls)
Post #: 12
RE: Installer for Pocket PC Applications - 9/1/2005 4:53:45 AM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
The Setup.sln project that I mentioned above is available from Microsoft Press.  You download an .exe that then provides you with all the code found within the Microsoft .NET Compact Framework text.  Once installed on your PC, you go to Start-->Microsoft Press-->Compact Framework.  This then opens up a folder that has folders for each Chapter of the book.  Go to Chapter 6, open the Setup folder, and there you'll find the Setup.sln.

Oops...in the code I posted above, there's a (size=2) and (/size) (obviously with brackets for html formatting).  These don't belong in the code, so take them out when pasting.

Dominic

< Message edited by domls -- 9/1/2005 4:57:25 AM >

(in reply to domls)
Post #: 13
RE: Installer for Pocket PC Applications - 9/7/2005 2:11:13 PM   
dmikesell

 

Posts: 2
Score: 0
Joined: 9/7/2005
Status: offline
Thanks very much Dominic, nicely done.

The Microsoft .NET Core Reference samples are at http://www.microsoft.com/mspress/books/companion/5960.asp#Companion%20Content

-David

(in reply to domls)
Post #: 14
RE: Installer for Pocket PC Applications - 9/7/2005 2:12:50 PM   
dmikesell

 

Posts: 2
Score: 0
Joined: 9/7/2005
Status: offline
Dominic, just curious - have you used this with Windows CE.NET?

-David

(in reply to domls)
Post #: 15
RE: Installer for Pocket PC Applications - 9/7/2005 5:14:19 PM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
Hi David,

Thanks!

Yes, this is my installation method for Smart Device applications written with Visual Studio.NET 2003 using Visual Basic.NET.

Dominic

(in reply to dmikesell)
Post #: 16
RE: Installer for Pocket PC Applications - 11/1/2005 8:56:07 PM   
Grumundi

 

Posts: 44
Score: 0
Joined: 4/26/2002
Status: offline
Is there a maximum amount of CAB files you can install with this method?, I have it working somewhat.

Problem is i have 7 CAB files that need to be installed, (yea i know, thats alot) the setup installer will install the first 5 and then just acts as if the other two dont exist. No errors, just installs the first 5 in the list

szParams[0] = TCHAR(0);
_tcscat(szParams, TEXT("\""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup1.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Set2.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup2.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup3.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup4.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Set1.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup5.ini\""));


I have changed them around and renamed in a useless attempt, I did have them all lined up from Setup1.ini to Setup7.ini but that didnt work. All the ini files to point to the right cab file, as they all install if they are placed in the first 5.

Any ideas?
  Or if anyone has a working setup with 7 cab files could you send it to me.

Cheers,

< Message edited by Grumundi -- 11/1/2005 9:46:09 PM >

(in reply to domls)
Post #: 17
RE: Installer for Pocket PC Applications - 11/3/2005 9:56:27 PM   
domls

 

Posts: 222
Score: 0
Joined: 4/26/2002
From: WY
Status: offline
Hello,

I don't think there's a limit, but haven't tested more than 6.

Here's the part of the code (in Setup.cpp) for 7 cabs:

[size=2]
szParams[0] = TCHAR(0);
_tcscat(szParams, TEXT("\""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup1.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup2.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup3.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup4.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup5.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup6.ini\""));
_tcscat(szParams, TEXT(" \""));
_tcscat(szParams, szCurPath);
_tcscat(szParams, TEXT("\\Setup7.ini\""));[/size]


Note: Ignore the [size] text.

Dominic

< Message edited by domls -- 11/3/2005 9:57:27 PM >

(in reply to Grumundi)
Post #: 18
RE: Installer for Pocket PC Applications - 11/22/2005 3:35:49 PM   
SConrad

 

Posts: 92
Score: 0
Joined: 5/15/2002
From: Cincinnati, OH
Status: offline
I have been searching around for a while on how to install my PPC program. This is wonderful.  Thanks Dominic!

I found the cab files I need to load by watching what cab files show up when I use deploy in Visual Studio.  I followed the advice here for ordering the setup files.  My first setup.ini is to load the symbol.all.arm.cab file (this is for a Symbol PPC scanner), it then has setup.ini's for the various compact framework and SQLCE cabs, and finally ends with my application.

When it gets to my application, I get a warning message that my application requires the installation of symbol.all.arm.cab.  If you click okay, I can still run my app and the scanner and database stuff works fine.  (this is after I reset the scanner to factory settings so I insure that it gets everything it needs)

Do I need some kind of delay in the install to let the windows registry get updated before it gets to my program?

When I reinstall, it somehow does the cf and SQL cabs first, then my application and ends with the symbol cab.  How can the order change like that?  I swear that I have setup1.ini with my symbol cab and setup6.ini with my application's cab...

thanks,
Scott

(in reply to domls)
Post #: 19
RE: Installer for Pocket PC Applications - 11/22/2005 4:55:36 PM   
SConrad

 

Posts: 92
Score: 0
Joined: 5/15/2002
From: Cincinnati, OH
Status: offline
Just wanted to follow up on how I solved my issue. The order in which you run the setup files do not matter. This populates the Windows CE Add/Remove screen with the names of the nice names for the cabs. (for nice names, I do not mean the physical name of the cab but the name imbedded in it.  For example, I renamed one cab as app1_symbol.cab but it populates on that screen as Symbol...)  It then will process the names in alphabetical order. 

As a result, I had to change the name of my project cab file to be at the end of the alphabet.  I found I could update the company name in the inf file I use to build the cab from Pyramid Controls to The Pyramid Controls and then my cabs get processed in via the order I want.

Don't know if this helps anyone else but I thought I'd put it in just in case...
Scott

< Message edited by SConrad -- 11/23/2005 10:18:05 AM >

(in reply to SConrad)
Post #: 20
Page:   [1]
All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET >> Installer for Pocket PC Applications Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.047