Avatar of bozworthy
bozworthyFlag for United States of America asked on

Deploy an emulator with a Windows CE executable for demo purpose

I'm looking to develop an application for a smartdevice in Visual Studio 2005.  It's going to be something really simple and I've already debugged it in the emulators, which are pretty cool I must say.  Is there a way I can deploy one of the emulators with the exe file so that someone can demo my project without having Visual Studio available to them?
.NET ProgrammingSmartphone Programming

Avatar of undefined
Last Comment
bozworthy

8/22/2022 - Mon
alexey_gusev

You can deploy your app to the emulator and then save its state. This will result in creating the file with the session info.

Please consult the following link for the command line parameters, so then you can distribute the emulator with saved session file and restore it when you need it: http://msdn.microsoft.com/en-us/library/aa188169.aspx
ASKER
bozworthy

I don't think this is quite what I need.  It looks like you need the file called DeviceEmulator.exe.  For this question assume that the person running my demo does not have this file (I just searched several PCs in the office and that file is not present).  I need to know all the objects, such as that file, that need to be packaged up along with my application exe so that a person can run my application so that they see the phone image, menus, etc just as I see them when I deploy to an emulator and debug in Visual Studio.  If this is even possible, I'm not sure.
alexey_gusev

well, perhaps I misunderstand you, but how on earth are you expecting to see the emulator without the emulator itself??? it should be present and run, unless you're going to display a slideshow instead of your actual application.

if we set aside the emulator, probably the simplest way to deploy  is to map desktop PC folder to be visible as Storage Card in the emulator (but again - you have to have it on that machine) - just go to emulator menu File->Configuration. there you can find the place where you can provide the path to the Host folder (ie on your pc). Once it is done, you can put anything in that folder and it will be available from the emulator
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER
bozworthy

I'm not expecting to see the emulator without the emulator itself.  I'm hoping to send someone an msi file which contains my custom built application along with the necessary prerequisite objects to install the emulator on their machine when they run the msi file.  
alexey_gusev

ahhh, ok, now that's clear :)

so to achieve it, you could need to create such MSI (with whatever tool you prefer)
in fact, the standalone emulator itself is available from MS site, so this should not be your problem (or just include it in your package)

the next thing is as I described (if you like to have your app pre-installed into the Object Store of the emulator)
if you don't want to do it, you may create CAB file for your app (e.g. in VS2005) and then you have 2 choices:

1) Using e.g. Ezsetup usility (from SPB web site), create the exe to install it to PDA (emulator connected via ActiveSync in this case)
2) map the desktop folder on and copy the cab there. then it will be available from the emulator - just click on it and install

this is not 'highly' automated, that's why I prefer the option I came up first - save the emulator session and distribute it with your package. this way you don't need to worry about any additional installation, just the emulator itself, its saves session file and some script file (e.g. CMD or BAT or VBS or whatever else, like the shortcut) to launch it with the saved session
ASKER
bozworthy

Ok we're getting close.  I saved the state of my emulator session in VS 2005 and moved that file along with the emulator software executable to another machine.  I'm able to open the emulator session on the new machine. My app appears for about three seconds then the "desktop" of the device overlays it.  My app doesn't appear to be available via any menus.  How can I "install" my app so that it's availabe through Start > Programs or on the desktop so that a user can open it on the emulator?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
alexey_gusev

good news :)

to install the app properly - ideally you should create CAB file (via Smart Device Setup project in VS2005 or VS2008) where you can define the shortcuts - and then install it within the emulator (and save the session).

you can do it manually too - just navigate to where your app is located, create a shortcut (copy the app to the clipboard and then after long tap - select Paste shortcut), rename it to whatever you want, and finally copy that shortcut to \Windows\Start Menu\Programs. After all these manipulations you shoudl see a shortcut to your app in Start -> Programs
ASKER
bozworthy

I now have a SmartDeviceCab as part of the solution.  It contains "File System on Target Machine".  Within that I've specified that my executable should be placed in the Program Files Folder and Start Menu Folder. First off, am I correct that Target Machine refers to the virtual device and not to the PC on which I'm running the emulator?  I've deployed Windows applications to PCs before but this is a bit confusing since we're talking about real machines and virtual machines.  So anyway when I deploy the app in VS I still don't see my program anywhere.  I also saved the session and placed that sesssion file on the PC and opened it in the emulator with no luck.  What am I doing wrong now?
ASKER CERTIFIED SOLUTION
alexey_gusev

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
bozworthy

Got it.  The main thing I was missing at this point was going to the Configuration menu on the emulator and setting the Shared folder from which I could exeute the CAB setup file.  This actually maps a folder on the real machine to the emulator.  Once I did that I was able to install my app, save the session state, and then open that session in the emulator.  There's a few more details to iron out with the install and distribution but this was great.  
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck