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
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of bozworthy
bozworthy
Flag of United States of America image

ASKER

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.
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of bozworthy
bozworthy
Flag of United States of America image

ASKER

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.  
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of bozworthy
bozworthy
Flag of United States of America image

ASKER

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?
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of bozworthy
bozworthy
Flag of United States of America image

ASKER

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
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of bozworthy
bozworthy
Flag of United States of America image

ASKER

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.  
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo