Does Web Platform Installer support automation? - deployment

I wonder if I can automate WPI actions to setup a dev box in unattended mode, either with command line options or a configuration file. It looks like WPI takes a "URL" as a command line parameter but I have no idea what format the response should be in, and what it allows in general.
EDIT: Thanks folks for the huge effort to come up with ways to automate setups. As #fra mentioned now there is a command line tool for WPI.

WebPi Command Line was just released:
http://blogs.iis.net/satishl/archive/2011/01/26/webpi-command-line.aspx

"C:\Program Files\Microsoft\Web Platform Installer\WebPlatformInstaller.exe" /id "wpi://iisexpress&mvc3"
Will install both IIS Express and ASP.Net MVC
(using wpi version 3.0)
**
UPDATE:
**
Take a look at this awesome sauce
http://msdn.microsoft.com/en-us/library/gg433092.aspx

One more option that was not yet mentioned is that you can also directly plug into Web PI APIs. Here are some starting points:
Web PI APIs: Download Latest Web Stack Products for Any Platform
Web PI APIs: Install a product from a custom feed
However in most of the cases, WebPICmdLine should do the job.

I'm currently investigating this, thought I'd record what I've discovered so far.
webplatforminstaller.exe <configuration file> /id <wpi url>
configuration file: xml file defining the products that can be installed. See http://www.microsoft.com/web/webpi/2.0/webproductlist.xml for an example. If this parameter is not specified, the configuration file at that url will be used.
wpi url: wpi url that specifies a product to install. The format is wpi://productid/? where productid is the id of an entry in the xml file.
I'm still trying to figure out how to force the install to happen silently. I'll update if I find out how.

The WebPICmdLine alone does not work as it will ask you to install the web platform installer 3.0 or whatever the dependecy for the product/application you will try to install.
Therefore, install the Web Platform installer first (wpilauncher.exe), then drop webpicmdline.exe to that installation folder. After that, you should be all set to use the command line tools for your installation needs.
I have yet to figure out how to do an unattend to the wpilauncher.exe itself.

Related

How to deploy an Excel XLL Add-In and automatically register the Add-In in Excel

I have developed an Excel XLL using ExcelDNA and C#. I am at the point where I would like to begin testing the deployment, but cannot find much information that actually provides steps that work.
My project was developed as a Class library with ExcelDna references. In the .dna file, I have the code below that will pack all resources into a packed version of the XLL (i.e. the Pack="true" attribute).
<DnaLibrary Name="ExcelXLL" RuntimeVersion="v4.0" Language="C#">
<ExternalLibrary Path="ExcelXLL.dll" LoadFromBytes="false" Pack="true" />
I would like to deploy the packed XLL to the target machine in the path:
%APPDATA%\Microsoft\AddIns
In order to automatically register the XLL with Excel, I need to add a registry key that depends on the version of Excel that the user has.
For instance, on my computer (Windows 7 64 bit running Excel 2007 32-bit), I would need to add a registry key to the following path:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Options\
The key would be type REG_SZ with the name OPEN (or OPEN1, OPEN2, etc.) and the value
/R "ExcelXLL-packed.xll"
I have 2 problems though. The first is in determining which version of Excel that the user has to get the correct path and the 2nd is to determine the correct OPEN version that I need to create (for example, if the user already has OPEN, OPEN1, and OPEN2 then I would create an OPEN3 key).
I am trying to do the installation using either the Setup and Deployment project or a InstallShield LE project and cannot determine how to go about this. Does anyone know how to do this or a better way of doing it?
EDIT 1:
I have done a great deal of research on this and have looked at several windows installers.
In the Package and Deployment and InstallShield LE, I can get the install/uninstall to work by putting an installer class into my class library and bundling project output with the install. In this approach, I handle inserting/removing the registry key using the installer class. The problem that I have is that the user must uninstall first before running a new install (no update capability).
I downloaded the Setup Factory demo version and can get install/update to work but cannot do the framework check (not shipped with the demo). Also, the uninstall fails (though I may be able to get this to work with some more investigation).
I am interested in using the WiX installer, but would like to know if anyone has a sample of how to perform the deployment using WiX. I would also like to know if I need to use the installer class or if there is a different way to handle the search for the OPEN[n] key under HKCU\Software\Microsoft\Office[Version].0\Excel\Options. If I were to use the project output to enable the installer class, then I need to have 2 separate target directories (one under Program Files for the basic project output and one under %appdata%\Microsoft\AddIns for the packed XLL).
Any help is greatly appreciated.
Thanks,
Lee
To detect Excel 32-bit vs. 64-bit, you can check the registry: Detect whether Office is 32bit or 64bit via the registry
For the OPEN, OPEN1, OPEN2 etc. you typically need a Custom Action in the install script that enumerates the keys.
Using IsWix and Wix 3.7, I was able to resolve this.
Useful links for how to register the components are as follows:
For generating a C# class to handle Windows Installer Custom Actions:
http://www.codeproject.com/Articles/132918/Creating-Custom-Action-for-WIX-Written-in-Managed?fid=1599130&df=90&mpp=25&noise=3&prof=False&sort=Position&view=Quick&spc=Relaxed&select=4131367&fr=1#xx0xx
http://blogs.msdn.com/b/jschaffe/archive/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters.aspx
For setting the property of the CustomAction.config file to Content
WIX Custom Actions built for .Net Framework 4.0 does not work? Ways to resolve?
EDIT 1:
For general knowledge on WiX (Very important)
http://channel9.msdn.com/blogs/scobleizer/wix-team-the-most-used-piece-of-software-at-microsoft-and-its-open-source#Page=2

What language does SmartFoxServer 2x use on the server side?

I have downloaded and started the community version of SFSx2. I read everything on their documentation page:
http://docs2x.smartfoxserver.com/DevelopmentBasics/introduction
Which unfortunately only talks about flash client side code. Nothing about the corresponding server side code, nor about html5 client side which I need.
I downloaded the HTML5 examples, which took me a long time to find (they are here: http://www.smartfoxserver.com/download/get/140 )
None of the examples work, as they can't connect to the server. Presumably, this is because the examples only supply client side code. There are no instructions supplied on how to install or run the examples.
I can find no mention on the smartfox documenation on the following:
1) what language is used on the server side. One assumes its java.
2) how does one deploy java code to the smartfox server? I cant find any mention of this in the docs.
3) how does one find and install the server part of the client side examples (which are Tris, GameLobby, BuddyMessenger, AdvancedChat).
I applied to be allowed to post on the smartfoxserver forums, but no reply yet.
I also found it hard so I share what I've found out.
The server extensions are written in Java. I used Eclipse JUNO to write my code.
You can download Eclipse here. http://www.eclipse.org/downloads/
You export the extension in jar format from eclipse into you extension path. The name of your file has to end in 'extension' eg MyFirstExtension.jar otherwise sfs2x wont recognize it. Your extension path will be something like this: C:\Program Files\SmartFoxServer2X\SFS2X\extensions\MyFirstExtension\MyFirstExtension.jar if your working in windows.
You will find docs on JAVA API here. http://docs2x.smartfoxserver.com/api-docs/javadoc/server/
This is a link to the basic example code: http://www.smartfoxserver.com/download/get/120
Unzip the content into the [SFS2X_install_folder]/SFS2X/www/root/examples folder, overwriting the existing file. Run the index.html file, then navigate to another index.html to open the example. Run the sfs2x-standalone.exe first of course(see below). If you followed the 'server configuration tutorial' on smartfox website and changed the server ports, the examples wont work. Leave the ports alone until you start to understand the server.
This is a link to the flash example code: http://www.smartfoxserver.com/download/get/108
You will find the example code for apps mentioned above. They are written in Adobe Flash Builder and Java extensions. I don't know if there is any code for HTML5 but the Java server code and AS3 is there.
I also found that using the standalone server was the way to go rather than using SFS2x as a service. c:\program files\smartfoxserver2x\sfs2x\sfs2x-standalone.exe. Using the exe gives you the command prompt window. You can use the window for debugging and see the state of the server when it starts.
Most of the examples should work without creating extensions but to create an extension out of source examples:
Create and setup a new project in your Java IDE. You will have already set up a workspace.
Copy the content of the /source/server/src folder to your project's source folder.
Add SFS2X Libraries. Go to properties of the project -> Select Java Build Path -> Click Library Tab -> Add external jar. Add 'sfs2x.jar' and 'sfs2x-core.jar' from C:\Program Files\SmartFoxServer2X\SFS2X\lib folder. To create the extension, export jar file to extension path. Restart server.
Another problem I had was the Java Version I was using. I had to use Java1.6 with my version of sfs2x when writing extensions. This was trial and error as there was no documentation. There may be a newer version out now.
I had to copy all the server source into eclipse to try and understand how things were done. It was a way of having all the code in one place. There was a lot of trial and error as getting help is hard. I eventually accomplished what I set out to achieve. Good Luck.
SmartFox Server is easy to use even with extension. documentation Give try to Nuggeta solution for game development too. No extension needed at first. This is optionnal.
We have full HTML5 open source game walkthrough on github

NuGet is returning 503 Server Unavailable

Is there a way to load a package from an alternative server when Visual Studio Package Manager (NuGet) is responding with a "The remote server returned an error: (503) Server Unavailable" message?
This is an obscure condition that will likely only occur on an "enterprisy" network environment. If these conditions apply you:
you are required to access the Internet via an HTTP proxy server
the HTTP proxy server requires a valid user ID & password (or AD authentication) to allow requests to proceed
you've been messing with cool developer tools that were ported to Windows from a Linux/Unix environment
the new cool tool(s) work after adding the HTTP_PROXY (or possibly HTTPS_PROXY or both) environment variable(s)
you can access the NuGet servers from a browser without getting a 503 error
Then it's likely you broke NuGet by inadvertently invoking this configuration feature. I'm not sure exactly how the environment variable breaks NuGet but I suspect NuGet is detecting & using the http_proxy URL but sending an empty user ID & password which causes the HTTP proxy to reject the request.
Fix: remove the environment variable(s) you added and see if the cool tool can be configured to use an HTTP proxy without them.
Update: Ran into a version of this issue with the NuGet config file referenced in the "this configuration feature" link above. Open this file:
%appdata%\nuget\nuget.config
in your favorite editor. If it contains elements with http_proxy or https_proxy then removing these elements may fix the issue too.
PS: Hopefully I'll get an up vote from Colonel Panic :-)
If you have used the package in the past it is probably in your cache. You can add the local cache as an available package source by going into the Library Package Manager Settings under the Tools menu in Visual Studio. For Visual Studio 2012, choose Tools, Library Package Manager, Package Manager Settings, and then click on Package Sources.
In the Available package sources section, type a name like "Cache" and then in for the source, browse to %LocalAppData%\NuGet\Cache. You may need to use Windows Explorer to translate %LocalAppData%\NuGet\Cache into the full path (usually C:\Users\YourAccountName\AppData\Local\NuGet\Cache).
Once you have the Cache as an available source, you can now use the Package Manager Console (found under the View menu under Other Windows or also under the Tools menu under Library Package Manager).
From the Console (which is a PowerShell window with commandlets for NuGet) you can type "get-help NuGet" to see available commands.
Then using Get-Package, you can get a list of Package ID's. Make sure the "Package source" is set to "Cache" (or whatever you called it) and the Default project is set to the project you need manipulate, both of these are dropdowns located at the top of the Page Manager Console. You can also use the Get-Project to verify you are working against the correct project in your solution.
Finally, you can type Install-Package and when prompted enter the Package ID from the output of the Get-Package commandlet.
i had also this problem, it was becouse of my network.
if you have any blocking on your Internet, (like in companies internet or etc..)
you may not allowed to download the nuget package.
try to download the package in another network, maybe it can help you!
Talbott's answer did not work for me, as my cache was empty. However, if you have used the package in another solution, you can copy the items you want from the "packages" folder in the other solution to a packages folder in your target solution.
If you have no packages installed in the target solution, you may need to add the following to a repositories.xml file in the packages folder:
<?xml version="1.0" encoding="utf-8"?>
<repositories>
</repositories>
After doing that, the packages appeared to be installed in my solution and I was able to add them to projects.
Additional Note: I had to use the "Manage NuGet Packages for Solution" option at the solution level to add the package to individual projects. Using Install-Package from the console still returns a 503 even though the packages is already installed in the solution.
You can also get this error if you are using a VPN client (e.g. Cisco AnyConnect) and you have recently renewed your VPN certificate. The issue can occur after you have updated your certificate, but before you have rebooted. A reboot resolves the issue.
It is a pretty old question, but I have just encountered the same problem. In my case it occurred because I had more than one nuget package source configured in the Visual Studio Package Manager. In my company we use NuGet to get mainstream packages and MyGet for our own stuff.
When I attempted to pull a pretty big package it failed with a 503 code and the error link looked pretty odd, it had MyGet in it istead of NuGet. Turns out Visual Studio package manager tried to pull it from another source despite having NuGet chosen as a current source. Disabling other sources and then proceeding with a download fixed it.
Hopefully it will help somebody who stumbled upon this thread just like I did.
Another possible reason for recieving 503: If you're using Azure DevOps feed, then NuGet packages are limited to 500 MB.

FireBreath plugin automatic installation

I wrote a plugin using FireBreath, VS2010, for Windows, all browsers.
In FireBreath documentation I saw that I have to install WiX. I installed it.
I created the project using the automatic fbgen tool so it autmatically created a WiX for me.
I couldn't understand from the doc is waht to do now:
Do I have to edit the generated WiX source file? If yes, what to change there?
What to write in the object tag that will trigger the installation of the msi created?
Or at least say to the user that installation is needed and link him to a download?
10x!
With the WiX Toolkit installed, re-run the prep__.bat file to regenerate the installer project along with the main plugin project. Build the plugin project, then build the installer project named something like {YourPlugin}_WiXInstaller. The msi will be placed in Firebreath's \build\bin\{YourPlugin}\{Configuration} dir ( {Configuration} is Debug, Release, etc).
It's not necessary to edit the WiX file unless you really want to change a specific setting. One thing I can think of is changing the default per-user install to all users. Per-user is usually better because it avoids UAC issues.
Deploying it to the user is a bit trickier. For most browsers, the user must save & run the msi. On IE you can declare an object in the HTML body and point the codebase to a URL containing the plugin:
<object id="pluginid" type="application/x-yourplugin" width="0" height="0" codebase="/YourPlugin.msi" >
<param name="onload" value="pluginLoaded" />
</object>
However IE9's security seems to block MSI's here. It does work if the plugin DLL is used (codebase="/YourPlugin.dll"). This auto-install method only works in IE with signed binaries (unless IE's security options are cranked way down).
Hopefully a discussion thread on the MSI security issue will yield some answers.
Update:
As hinted by Richard / taxilian, an MSI must be packaged within a CAB file in order for IE to install it. Getting the INF right and creating the CAB takes some additional steps as documented by RB. And to add yet another wrinkle, Vista/Win7 do not allow the INF to call any binary outside of the CAB file, so a stub launching app must be used (see this thread and example code posted by Roey towards the bottom).

Creating SVN repository server with XAMPP on windows

For last 3 days I am struggling in setting up my SVN server. I tried several ways and tools but I found always some issue and bug all the files.
I am planning to use the following tools for this project.
For Server and database - XAMPP (Comes with APACHE and MySql)
Version control server - subversion-1.6.16
Version control client - tortoiseSVN
IDE is Eclipse
Following are my queries
1. Is the above combination of tools and softwares is perfect for my project?
2. Is there any open-source software which provides all the above functionalities combined?
3. If anybody of you has already done such kind of project, could you please share with me which are the correct version of softwares I should use to get it worked error free.
If anybody can provide solution for below I can carry on with my current setup also.
My Error Message from server for current configuration : I tried to setup the svn-win32-1.6.16 with my XAMPP installation by copying the two moduels mod_dav_svn.so and mod_authz_svn.so to my apache modules directory and changed the httpd.conf file with Loadmodules of these the so files and set the location also for these. But when i start the server in error logs I get error message like this - "httpd.exe: Syntax error on line 136 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_dav_svn.so into server: The specified module could not be found."
Following are pre-conditions and configurations prior to this error
Location of SVN - C:/SVN/svn-win32-1.6.16
Location XAMPP - C:/xampp/
Changes in httpd.conf file
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
and for location
# Enter this location in your browser to access the repository
<Location /repos>
DAV svn
SVNPath c:/SVN/svn_repos
</Location>
I have created the repository here - C:/SVN/svn_repos
Is the above combination of tools and softwares is perfect for my
project?
That is impossible to answer, because:
a) we don't know what your project is
b) nothing is perfect
But it is definitely an ok combination of tools. If I were you I would not use XAMPP but Zend Server CE instead! You get a nice web GUI for most php configuration needs.
Is there any open-source software which provides all the above
functionalities combined?
No. These tools are maintained for various target audiences and the combination you're asking for wouldn't make much sense in a bundle.
But of course your IDE (Eclipse in this case) integrates nicely with these tools. 'Integrates' means it plays together, doesn't mean it comes bundled with these things.
If anybody of you has already done
such kind of project, could you please
share with me which are the correct
version of softwares I should use to
get it worked error free.
I used to have such a combination (now I'm on Zend Studio with Zend Server CE) and there is no problem with it. The problem is that you're trying to do something unnecessary and wrong.
If you're using XAMPP, you're on a Windows machine, using .so extensions wouldn't do any good at all, Windows needs .dll extensions.
Why do you want to load such extensions anyways? You don't need those in order to get it all working.
Where are your repositories? Only if you want to host your own repositories do you need to run your own server. If that is the case, look at VisualSVNServer. You just install it, no need for integration with anything.
If your repositories are on a location in the net (more likely) you don't need an SVN server, you just need the client. In that case you're ready to go, no need for php extensions. You can checkout repos, commit, export, branch, tag, etc. From within Eclipse or in your file system with TortoiseSVN.
Try it and get back here, if you still experience problems.