By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

Setup/Deployment options

P: n/a
I want to deploy a service with a windows app and the setup program
must conform to the Vista certification requirements. Can that be
done with the standard .net setup project? Assuming cost is an
issue,
what else is available?

Apr 7 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
By "standard .NET setup project", I assume you mean Visual Studio 2005 setup
and deployment project.

Let's have a look at the Vista installation-related requirements:
Use Windows Components for Installation
Yes, a setup and deployment project creates an MSI.

Support User Account Control for Installation
This basically says the installation shouldn't assume the user installing
will the be same user using the installed components. A setup/deployment
project does nothing in this respect, it's how you implement your particular
setup/deployment. I don't know how this requirement can be evaluated.

Install to Correct Folders
Similarly, setup/deployment defaults to correctly fulfilling this
requirement; but it's up to whomever implements the setup/deployment.

Sign ClickOnce Manifests
Although strictly not part of a setup/deployment project, Visual Studio
2005 supports signing ClickOnce Manifests. You'll have to shell out the
US$999+ to get the certificate to sign your manifest...

Keep ClickOnce Installations Isolated
Again, not a feature of a setup/deployment project directly; it's how you
implement it whether you put user data only in user directories... A
setup/deployment project doesn't stop you from violating this requirement.

Correctly Configure Package Identity
Yes, setup/deployment projects allow you to register the application in
Add/Remove Programs (now Software Explorer).

Install Windows Resources Properly
A setup/deployment project really doesn't do anything on its own. With
this requirement you have to be sure you don't deploy components that aren't
classified as "system" components. a setup/deployment project does nothing
to stop you from doing this.

Follow Best Practices for Creating Custom Actions
Somewhat subjective, and I can't see how this could be validated. See the
requirements for details.

Avoid Reboots During Installation
Also up do the particular implementation of a setup/deployment project.

Support Command Line Installation
Yes

Follow Component Rules
Also detail of the implementation; see requirements to ensure you implement
correctly.

In short, yes, setup/deployment projects allow you to create an installation
the fulfills the Vista installation requirements.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"an******@gmail.com" wrote:
I want to deploy a service with a windows app and the setup program
must conform to the Vista certification requirements. Can that be
done with the standard .net setup project? Assuming cost is an
issue,
what else is available?

Apr 8 '07 #2

P: n/a
Thanks Peter, it sounds like it will be flexible. A couple of
specifics:

1. I'm installing a service, but the Uninstall does not stop the
service reliably. Also... when the service is stopped the registry
settings are deleted, but the entry remains in the Service Control
Manager until the computer is rebooted. So my solution is to use a
custom action and override Installer.Uninstall. That reliably stops
the service and I'm about to try deleting it manually with the
DeleteService API. Is that the right way to go about it?

2. Running the program after Install. I don't want the program to run
until the Finish button is pressed. So use the AfterInstall event and
wait around for the window to be closed? Or is there another way?

Thanks again,
Andrew

Apr 9 '07 #3

P: n/a
I found the problem with the Uninstall not being reliable: Reference
counting under the SharedDlls registry key. If the count is 1,
Uninstall decrements the number and exits.

Apr 9 '07 #4

P: n/a
I'm not clear, you've resolved with issue with stopping the service?

If you're installing a service, there should be no program to run after
install. So I'm clear: you want to run your application after you press
Finish in the installer but you don't want to installer to exit until the
user exits your application? Why?

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"an******@gmail.com" wrote:
I found the problem with the Uninstall not being reliable: Reference
counting under the SharedDlls registry key. If the count is 1,
Uninstall decrements the number and exits.

Apr 10 '07 #5

P: n/a
Yes, the service is stopped and Uninstall removes it properly IF the
reference count in SharedDlls is 1. The LegacyShared property in the
setup project led me to believe there was no reference counting.

Displaying the app after it's installed: It's a service with a
separate control panel EXE and the control panel starts after the
installation is complete. So it starts the process with an argument "/
setup", which tells the control panel to wait for the setup window to
close:

static void WaitForSetupToClose()
{
FindWindow:
bool found = false;
foreach (Process p in
Process.GetProcessesByName("msiexec"))
{
if (p.MainWindowTitle.ToLower().Contains("my
title"))
{
found = true;
break;
}
}
if (found)
{
Thread.Sleep(500);
goto FindWindow;
}
}
Apr 10 '07 #6

P: n/a
Your control panel application requires msiexec not to be running? I can't
tell from that what the best solution would be. Why does it need msiexec not
to be running?

The problem with the say you're doing it now is that another install could
be running and you control panel application can't tell if the "correct"
msiexec has exited or not...

"an******@gmail.com" wrote:
Displaying the app after it's installed: It's a service with a
separate control panel EXE and the control panel starts after the
installation is complete. So it starts the process with an argument "/
setup", which tells the control panel to wait for the setup window to
close:

static void WaitForSetupToClose()
{
FindWindow:
bool found = false;
foreach (Process p in
Process.GetProcessesByName("msiexec"))
{
if (p.MainWindowTitle.ToLower().Contains("my
title"))
{
found = true;
break;
}
}
if (found)
{
Thread.Sleep(500);
goto FindWindow;
}
}
Apr 10 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.