Creating a CAB file on WinCE - zip

I want to make a CAB file on a WinCE 5/6 device.
The idea is that someone would run a backup script that creates the CAB file, which can then be loaded back onto the device at any point restoring settings to a previously known point.
The settings are xml and custom files in various folders on the device, I am not talking specifically about registry settings.
If this cannot be done is there (commercially) free ZIP file creation software that could be used?
Thankyou in advance
Chris

DotNetZip is a free zip library that will let you do this.
See also:
zip and unzip files and folders on Mobile Device

Is doing this from the desktop side any good?
You can use this registry tool using ActiveSync. The tool has a nice feature of Reg->CAB. Once you want to restore settings, you can clean the registry using OALIoCtlHalGetHiveCleanFlag and then run the CAB to restore the settings.
I know this does not include the requirement:
run a backup script
But it is a quick solution that might give you an idea.

Related

How to check if files exist in .ism without using InstallShield

I want to verify if certain exe files already exist in a merge module .ism (binary format). Is there a method of doing this without using InstallShield?
An *.ism file is really an MSI file with a changed extension. MSI files in turn are SQL databases stored as COM-structured storage files - a file system inside a single file with file streams for various content. This is the same format used in Office documents.
You can view MSI files with Orca from the Windows SDK: http://www.hass.de/content/how-install-microsoft-orca
Windows Installer XML (WiX) Deployment Tools Foundation (DTF) has an InstallPackage class available that exposes a FindFiles() method. This should be really easy to query the EXE. Just realize that being a merge module you won't know the full installation path as that's decided by the MSI generally.
Both of Chris's suggestions should work fine, as would using Orca. But it got me thinking there might be an even easier way using a tool called Merge Module Finder. It all depends on what you really want to do? Find files already in merge modules? Investigate what merge modules are in an Installshield file? It is not quite clear exactly what you want to do.
Though a bit clunky at times (I think the author hasn't updated it for the latest versions of Windows) it will help you look for a file in a bunch of merge modules interactively. You can also search for a registry value. Here is a screenshot:

Edit a file on IIS Manager by wix installer

My requirement is to edit a .xap file which is already in the IIS Manager.. when install another web application on IIS manager. (I want to add the end points of a web application in the previous web application .xap file)
You could write a custom action to:
Open the .xap file (it's a .zip file named differently)
Extract the file(s) that need to be modified
Edit the extracted file(s)
Re-zip the extracted file(s) back into the .xap file.
You could find the existing .xap file using AppSearch of some sort. Maybe a FileSearch element. Most of the work is going to be in your custom action though. Good luck!
Please see Mike's answer over at:
NSIS Changing config file present in XAP file i.e. silverlight component build
There's two parts here:
1) Authoring the Silverlight application to use an external config file.
2) Authoring your installer to update that config file. In this case of WiX, it's the XmlConfig element in the Util extension.
The reasons for doing it this way is to have a highly reliable installer. If you write custom actions to extract, edit and compress the XAP you'll invalidate digital signatures and introduce complexity and fragility to your deployment process. Avoiding the temptation to do all this and just use XmlConfig gives you a robust, declarative installation that fully supports the Windows Installer rollback story.

Multiple cab installer for Windows Mobile with CE kernel in lazarus

Spending more than an hour on figuring out if an equivalent solution to the problem of Multiple CAB installer exists for Windows Mobile in the lazarus cross-platfor compiler I have become tired? I mean the code that represents roughly the same functionality as:
http://www.codeproject.com/Articles/65319/Automatically-Install-Multiple-CAB-Files-to-a-Wind
but as far as I can say it is not possible by interior inf declaration, nor by:
http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#Installation_of_an_app_build_with_Lazarus_on_a_WinCE_device
Do you know any solution to that?
You are confusing two concepts with one. The first link describes how to use ActiveSync's deployment architecture to deploy multiple CAB files from the PC serially. One CAB file is pushed down to the device and extracted, then the next is pushed down and extracted. This is done by hooking into the extensibility for a desktop MSI file and Windows installer.
This should work fine for any set of CABs - Lazarus or not. To this system a CAB file is a CAB file, the contents are not relevant.
The second link is a description of an INF file (among other thigs). This is an input file for CABWIZ.exe, which is a desktop tool that simply generates CAB files that can be used on a WinMo/WinCE device. even if you generate a CAB that contains another CAB with CABWIZ, the device side of things (wceload.exe) does not support extracting a CAb within a CAB.
It's a fundamental limitation that you can't avoid. To make things worse, newer versions of WinMo can't have two instances of wceload running, so you can't launch (via a custom installer DLL) a second instance of WCELOAD to extract an internal CAB.
You best solution is to not try. Just extract everything for your app on your PC - app, references, resources - everything. Then create an INF to package it all into one CAB (not a CAB inside a CAB) and then deploy that CAB.

MonoTouch Enterprise - Deployment

Our firm has begun building MonoTouch iPad/iPhone apps for enterprise deployment.
How do I take the app and create a *.ipa file for upload to our MDM server?
An .ipa file is basically a glorified .zip file. There are a couple of routes you can go down:
Export the project to xcode and under "Build" click "Build and Archive" - fill in the appropriate details and the project should create the .ipa for you as expected.
If this isn't an option, (which it isnt for us, so this is the method I've used, to great success) you can simply create all the components that go into the .ipa and right-click, "Compress..." in Finder.
The .ipa is made up of the following components:
A folder named "Payload", which contains the compiled (release/iPhone) .app
a 57x57 .png icon file (which is displayed while the app is being downloaded)
a 512x512 .png file of the icon once again - however this has to renamed itunesartwork with no extension
iTunesMetadata.plist - this contains information about the app, such as copyright name, genre, itemname, softwareIconNeedsShine (you can google what information this needs).
The way I package up our .ipa, is I have a folder called "App Packaging" which has all of these components already in, and I simply update the .app file whenever we do an upload, "Compress..." then rename the file to x.ipa (OS X will ask if you want to use this extension, make sure you select ("use .ipa" !).
With the current Monodevelop (2.8.6.5) and Monotouch (5.2.5) it is as easy as right clicking on your project -> options -> iPhone IPA Options -> check Build ad-hoc/enterprise package (IPA) for the desired configuration.
We created a special configuration called Distribution which builds using the Distribution Certificate and In House Distribution Profile.
Luke, I like your answer and have given you the credit. I am adding some more details for my own, and others, notes.
Use SpotLight to find one of your own MonoTouch apps. Search on ".ipa".
Rename it to SomeThing.Zip
Unzip it.
You can then use the structure of the unzipped folder to edit then rezip.
Just another way to get an IPA that made it easy for me, drag your .app file onto your itunes library and sync your device. ITunes then creates a copy of the app as an .ipa file in the user/music/itunes/itunes media/mobile applications. This can then be distributed much easier than the .app file.

Win32: HtmlHelp doesn't work from a network share. What's the alternative?

Since 2005, when Microsoft prevented HtmlHelp functioning off a network share, e.g.:
\\appserver\tos\PointScanner.exe
\\appserver\tos\PointScanner.chm
What are we supposed to do instead?
(Given that the application is not installed locally.)
To rephrase: What is Microsoft's intended, supported, out-of-the-box, help solution?
You can allow access via the Registry setting described here:
http://support.microsoft.com/kb/896054/
If you don't want to open any security vulnerabilities by modifying Registry settings your application could also create a local copy of the .chm file, e.g. in the users temp folder (%TMP%) and open the help from there. You can remove the file again when your application exits (in case you don't want to leave anything behind on the user's workstation)
I started with the registry change mentioned by divo. Eventually I moved from network folder based chm files to actual "html help". This was easy for me since I use RoboHelp which can generate either format from the same source code.

Resources