Installation with visual studio 2010 - visual-studio-2010

I need to create setup file for installation of these:
-Web app
-Win service
-Run some sql scripts.
I wanted to do all in one setup. For example I want to make method like CreateSetup and in that method to create setup file which will contain installation/run of above 3 things.
If you have some links or idea how to do it please share.
Thank you in advance.
If I come across some solution I will post it here for others as well.

It might very well be worth your while to sit down and learn WIX, it seems the preferred method of dealing with more complex setups. I haven't done the tasks outlined here, but I did mange to have an installer that set up an application on a Windows Mobile device.
Looking around a bit, it does seem you can install web applications: http://www.codeproject.com/Articles/115036/Creating-WIX-Installer-for-ASP-NET-Web-Application
And a windows service: http://blog.tentaclesoftware.com/archive/2009/01/01/21.aspx
And run SQL scripts: How to run sql script to create database using Wix
It does appear you could even capture what is required to build a SQL string through the windows installer GUI, and use that to know where to run the SQL script, and set up any needed connection strings.

Related

Inno Setup modular installation

I'm trying to release a program with a client/database approach.
The client and database can be installed on 2 different computers.
What I'm trying to do is an installer that at the beginning asks if you want to install the client, the database or both.
Is this possible? Which section should I modify?
I warn you, I've never wrote an Inno Setup script, I always used ISTools, but if there is no other way, I'm ready to get my hands dirty :P
Edit: a bit more info.
At the moment I have 3 installers, one for the client, one for the DB (which is postgreSQL) and one for PDFCreator.
What I'm doing is copy the files to a directory and then ask at the user what he wants to install: [Run] section, Post Installation.
Yes, it is possible. Take a look at the CodeDlg.iss example. It show how to create a dialog to ask which edition to install. In the case of CodeDlg, it is various editions of a program (light, sponsored, paid) but the concept is the same. I've done this before as well. In my case, during initialization, I read a registry setting and set some variables up to choose which version (client or server) I install. I don't have it here but will get it later and add to this answer.

Managing a remote Windows Service

As part of my app, my users install a Window Service (msi file written in C#) that uploads data to me. These Windows servers are usually behind all kinds of firewalls etc. and run by IT staff so it's difficult to get in touch with anyone to debug.
What can I put inside my application that would make it easier to figure out things? I'm not looking to do anything that would be considered "shady" but here are some ideas I've thought:
Open log files that are relevant to me in a separate thread and stream it back up to the server
Setup some kind of reverse tunnel (not sure if there is a sane shell environment on Windows that I can connect to)
Any ideas or thoughts would be appreciated.
The author of the logging framework we use (the object guy's) has a service that might be useful for you.
You can debug .NET and native code through remote debugger with Visual Studio, see the post of John Robbins about it : http://www.wintellect.com/CS/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx

Install multiple softwares with one installer (install wrapper?)

I'm looking for a solution to run multiple setup files (.exe and .msi) in sequence without any user input. The idea is to have everyone in my workgroup to have the same development tools (eclipse, python, cygwin, etc) by running one installer. Besides creating a batch script, is there a software out there that could create such a wrapper of installers?
Thanks!
From my knowledge there aren't any tools which create this type of wrappers, or if there are they are not MSI-based. This is because Windows Installer is very restrictive when it comes to running multiple installers simultaneously.
You can try using a setup authoring tool which supports package prerequisites. This way you can create a dummy package which installs nothing, but still handles all the applications you want installed.
If you want some suggestions don't hesitate to contact me.

Erlang application launch on a Windows server

I have an Erlang application that is deployed on a server with Windows Server 2008.
The way I do this:
Copy application folder in Erlang lib directory.
Open command line (cmd). Execute erl.
Execute application:start(app_name) in Erlang shell.
Are there any better approaches to launch the application? How to make the application to launch on Windows startup?
I have no experience with Windows but...
`1. First of all, you might want to have a look to the concept of release in Erlang. Essentially,
When we have written one or more applications, we might want to create a complete system consisting of these applications and a subset of the Erlang/OTP applications. This is called a release.
`2. Then, you might want to create a script that contains something like:
erl -boot ch_rel-1
Where essentially you're starting Erlang/OTP using a boot script that you created above (just follow the instructions in the releases page)
`3. This article explains how to create startup scripts in Windows Server 2008 (not tested, just googled):
http://technet.microsoft.com/en-us/magazine/dd630947.aspx
Hope this helps. Nice question.
Perhaps rebar might help. It makes building an app skeleton and release quite easy. A nice tutorial is here.
After getting familiar with releases, take a look at manual pages (erl -man ) for start_erl and erlsrv. I used them to start embedded system ( http://www.erlang.org/doc/embedded/embedded_nt.html ) in windows 2003, hope it still works for you in windows 2008.
After creating service with erlsrv it is possible to manage it via standard windows command line and GUI tools, e.g. setting start mode and restart policy.
May be you could start just your application by supplying "-s app_name" as erl/start_erl additional flag, but I didn't try that, as I had to go long route with embedded system release. In that case make sure you have "start() -> application:start(?MODULE)." in your "app_name.erl".

Is there an official GUI way of installing and removing .Net services on Windows Server 2008?

Please read the whole question; I personally think that this is programming-related; if you think otherwise, then please migrate without down-voting.
I have found two different ways of installing a service:
http://www.wsinnovations.com/softeng/support/manualservice.html
as well as using http://msdn.microsoft.com/en-us/library/50614e95(VS.80).aspx
The reason why I ask for this is that I am trying to debug a service which is somehow supposed to update itself. It is not currently working, but I was told that this did work in the past.
I have been using the sc delete <servicename> command to remove the service (because it is shorter that way), while installing it with an installutil command. I hope this does not result in any side-effects; I would like to rule those out.
Ideally, it should be possible to install and uninstall services right from the screen which lets the user start and stop them, but such option is not does not exist unfortunately. I am looking for the next best thing, which is a GUI wrapper for installutil.exe
No - not in the way I believe you're thinking of. The GUI way would be as part of an MSI or other installer, which calls the same APIs as installutil does.
So what you could do is write an installer which can run silently, and then use that to install and uninstall.
You could create an installer using one of the many installation frameworks out there. I personally use WiX and there are a bunch of examples out there about how to write these sorts of things.
Maybe have a look here to get an impression of the underlying API: Install a .NET windows service without InstallUtil.exe

Resources