Create a Sideloading Windows 8 Modern App Installer - windows-store-apps

We have a Windows 8 Modern / Metro app that we wish to deploy outside the store. I have read a bunch of materials on getting a side loading license to allow this. However, we need to go beyond just copying the app over and running some PowerShell commands, we also need to install a particular hardware driver and make some registry keys.
Can anyone recommend an installer creator that can perform all of these tasks?
Out of curiosity, is it possible to distribute through the Windows Store and have it do more than just copy the app down, i.e. execute an installations script?

By design, the installation process for a Store app, whether downloaded from the Store or side-loaded, is not customizable. For Store downloads, this is done to guarantee that the app install won't create anything that cannot be reversed during an uninstall, e.g. create registry entries, copy files, and otherwise do things that can permanently alter the system.
For side-loading, although you cannot alter the specific package deployment process itself, you can use the Powershell deployment as just one step in an overall install process. You should be able to build such an installer with any number of existing Desktop application installer tools, which give you control over all steps in your install process including registry, drivers, running scripts, etc. So you'd just have the app package and PS scripts as part of the installer .msi or .exe, and executing the PS script is done from the installer.
(By the way, the Store/PS app install processes use the same API in Windows.Management.Deployment.PackageManager to do the work. This API can be used only from a full-trust process like the Store (a piece of system code) or Powershell running in an admin console, but is there so desktop apps can implement alternate install procedures directly.)

Related

How to write a cross platform setup script in Ruby

I am new to ruby and just beginning to understand It's potential. So I am trying to use it for my everyday tasks. One of those things would be the setup of a Webservice on a local machine for testing. It set up script should:
check out several projects from subversion repositories
install Hadoop (if it's not already installed), start the Server and execute a few commands in the hbase shell
install the JDK (if not installed)
install MySQL (if not installed) and execute some SQL to create and set up the DB
Install maven (if not installed) and run some maven tasks.
So here's the deal. I want this to be a cross platform installer - it should be able to install the Webservice on Windows, Linux or OsX.
Is it possible to implement this in Ruby and what gems could be useful for that task? Are there better ways to create such an installation routine?
Regards
R.
Have a look at Chef. It provides an automation framework for managing systems. It's written in Ruby and you use a mostly Ruby recipe DSL.
People package Cookbooks for managing groups of installation and configuration recipes, which are normally based around a piece of software.
Hadoop
MySQL
Maven
Java
You will run into issues bridging the gap between Windows and Unix. Although Chef does provide good Windows support these days most Chef/community cookbooks will support Linux primarily as they can rely on the underlying package manager which Windows lacks. Often you may end up finding/using separate Windows cookbooks specifically for the Windows install.
For when you do need to do a Windows install, look at using Chocolatey and it's cookbook which provides a unix like package interface for Windows so you don't need to worry about packaging up the software manually or dealing with random NSIS/MSI installer options.
If you do extend one of the Unix cookbooks to support Windows, be nice and contribute it back to the community.

Why is my IsolatedStorage whiped when I rebuild my Windows Phone 8 project?

There are several questions on StackOverflow about the same topic, but I haven't found the solution.
In my Windows Phone 8 App I store user settings in the IsolatedStorage.ApplicationSettings.
This works great, I use IsolatedStorage.ApplicationSettings[key] = value to set my values and ofcourse use IsolatedStorage.ApplicationSettings.Save() to save them.
I have also created a database using a .sdf file to save local data.
When I use the Deploy function in VS2013(Visual Studio 2013) to update my app, the isolated storage settings will remain.
However, when I have used the Rebuild or Clean function in VS2013, the isolated storage will be whiped on the next deploy! Resulting in the deletion of all local data and usersettings.
Why does this behavior occur?
A work-around would be to not use these functions, I could basically do all my work from development to deployment without using Rebuild or Clean. But when I would (accidentally) use these functions I would be unable to deploy without whiping all local data on the devices.
This behavior also occurs when I upload my App to the Windows Phone Beta Store. (I haven't used the live store yet)
UPDATE:
Thanks to robwirving I have some new insight: XapDeployCmd.exe
This is a tool that can perform all the deployment tasks that Visual Studio normally does for you, in command prompt. The relevant actions are installlaunch and update.
I think VS performs an installlaunch action when the deployment process detects the project has been rebuild. However, if I use the update action with XapDeployCmd on a Xap build by Visual Studio, which has been Cleaned and Rebuild, the isolated storage is NOT whiped.
Could it be that the Windows Phone Beta Store mimics this behavior?
The default behavior of Visual Studio is to do a fresh install instead of an update when it has detected a rebuild. As far as I know this is not configurable.
You could do a rebuild and then update your XAP without deploying through Visual Studio however. Here is the documentation for XapDeployCmd, a command line tool included in the Windows Phone Dev tools that allows you to install or update a XAP from the command line. http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565%28v=vs.105%29.aspx
When You perform Clean Solution Visual Studio Cleans all the data related to Project and all related linking to the .dlls and other linked data. It serves as cleaning of all Generated files and data so Ultimately you loss your local data.
In the Case of Rebuild Solution Visual Studio Regenerates files and data that you are using with that Solution so In the Process of Regenerating your data and linking of .dlls also get cleared and new solution for that Project is Created so here you also loss Your data
In Short, The Process of Clean Cleans the Whole Solution linking and data while Rebuild regenrates the new solution after cleaning the data and linkings.

Creating installer with multiple support files

I currently have a program that uses Qt, MySql, and MS Visual Studio 2010 compiler. I want to create an installer that can be put on a fresh computer, and when opened, it will install my program plus all the needed files from the others.
I don't know if it matters but I followed this blog to install the files in the first place: http://eraden.blogspot.com/2013/05/my-fight-with-qt-5-and-mysql-drivers.html
Is there any way for my installer file to first run through the steps to install the support files, then have it install my program in such a way that the program has all the files it needs?
Thanks in advance,
-Duncan
You need to add the resources as prerequisites to the main package, this will make them install before your application, so the system is ready to launch the application when the installation is done.

Microsoft Access 2002 Package Deployment Problem

I've created a split Access database application and used the packaging wizard to create a deployment package. All the files are installed by the deployment package into C:\Documemts and Settings\All Users\Application Data\Provision Manager, this is too avoid Windows Vista not allowing write access to the Program Files directory.
The application installs OK on both Vista and XP and creates a Provision Manager entry in the Program Group in the user account that installed the application, however when I login using another account (both Admin and non-admin ones) the there is no Provision Manager item listed in the Program Group.
Can anyone enlighten me as to what is going on here and more importantly how I can ensure that the deployment package creates a Program Group item for each user account.
Thanks
Marc
To ENSURE that the package has created the right Program Group, look in All Users/Start Menu/Programs because these programs are automatically placed in every user's Start Menu when they log in. Similar for Desktop shortcuts, place them in All Users/Desktop
The fundamental problem (and it's not really a problem but a feature) is that MS tightened up security in Windows Vista. Users are no longer allowed to update the All Users Start Menu/Programs or Application Data folder. Only administrators can update such as using instllers. Now that's mostly fine for the shortcuts to Access FEs. The real problem arises with the FE MDB/MDEs as users pretty much have to have read/write/create/delete (although strictly speaking create/delete privilieges are only required for LDB files.) So those can't be installed into the All Users folders.
The solution is to split the runtime install into two components. The administrator types install the actual Access runtime into Program Files along with msaccess.exe , etc, etc.
Then you have a second install with the users can run which puts the Access FE MDB/MDE, and other files in the Current Users Applications Data folder along with shortcuts on the desktop.
If the users are on your local LAN you could use the free Auto FE Updater utility to handle the FE installation for users.
If the users are remote then you can use the Sample inno script which checks to see if a version of Access is installed. If not it tells you to install a runtime version of Access. If installed then it continues to install your FE MDE and other assorted files.
http://groups.google.com/group/microsoft.public.access/msg/10e3fc9234660872?hl=en
Sample inno script which "wraps" the package wizard install into a single .exe
Deploying updates to your software in a Runtime environment for Access 2007

Access 2007 Engine: How do I include it in my .msi installer?

I have a .NET application which uses an accdb file (MS Access 2007 format) as its database. To install this app on another machine I need to install the Access engine on that machine. Microsoft has this file: AccessDatabaseEngine.exe which includes the engine, but when extracted during installation, runs another .msi installer.
As you can guess, since this msi is run during the installation of another msi (my app's installer) the Access engine setup fails with error 1500: "Another installation is in progress. Finish that one before continuing this one..."
I found the Runtime for Access 2007 as well, and it does install the engine, but the Runtime package is again an msi installer which means I'm still having the same problem.
Any ideas to include the engine in my app's installer?
You probably want to have a look at this article: Adding Programs to Access 2007 Deployment Packages
The Access Developer Extensions offer a basic but functional installer that can take care of the general deployment scenarios.
The best think would be to build your own msi pack including needed access files. You could use a product like VERITAS Wininstall. You have this "Discover" method that allows you to build a fully operationial .msi file by (1) taking 2 snapshots of your system (one before the installation, one after) then (2) creating the .msi file corresponding to the installation process.
Anyway, I'd advise you to have multiple packs, one for Access, that can be installed with a "for all users" option when the computer joins your company's domain, one for your app. By doing so you will be able to distribute new versions of your app without redistributing Access, which takes a few mega of space as well as a few minutes of user's most precious time).
Sio if Microsoft already delivers an Access Runtime msi package, just keep it 'as is' and distribute it automatically on your network when a new machine joins the domain.
I wouldn't recommend WinInstall, we have it in my office and we have to keep calling them in to package stuff for us as it's so finiky to use. Some things they haven't been able to package at all. WISE Studio is better or a free alternative is AppDeploy whihc I have heard great things about.
I found this software called "Bootstrapper Manifest Generator" or BMG. It helps create a prerequisite package using an MSI or EXE installer file, and adds it to VS2008 Prerequisites dialog box in Setup and Deployment projects. Although it's not that user friendly, it does the job. It's on MSDN: code.msdn.microsoft.com/bmg
Thought it's good to save others from going through all the trouble.