473,396 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

.net/msi project questions

Using VS2003 I have created a solution containing 2
c# projects and one setup project. One c# project is
a nt service and a project installer for the service.
The second c# project is a form and an installer to
show the form during the install process. Primary
output from both these projects has been added to the
setup project and to custom actions (install/commit/rollback/
uninstall).

1) How do I abort/rollback the installation if the data the
user provides in the form is not correct? From the
installer that shows the form I have tried:
this.parent.rollback()
but it dosent seem to rollback what the other installer
has installed.

2) The form that I use to collect data during setup is also
made available from the users programs menu. The form shows up
as "someform.exe" in the menu. How do I give the entry a
name other than the filename? (I added it by rightclicking
the setupproject then selecting view->file system and adding
the form to the user's program menu node).
Nov 16 '05 #1
3 1889
1) Is to throw an InstallException from the installer class method being
called. However it's not clear to me what you're doing - it looks like
you're running a program as a custom action, so if the custom action is set
up to abort if it fails, try returning a non-zero exit code from the
program.

2) Seems to be a Windows Forms question.

What you're doing is not recommended because runnning UI from the execute
sequence is "a bad thing. You should insert a dialog into the UI sequence
and collect your data there into properties that you use in custom actions
etc later on.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"TDOR" <tj*****@hotmail.com> wrote in message
news:12**************************@posting.google.c om...
Using VS2003 I have created a solution containing 2
c# projects and one setup project. One c# project is
a nt service and a project installer for the service.
The second c# project is a form and an installer to
show the form during the install process. Primary
output from both these projects has been added to the
setup project and to custom actions (install/commit/rollback/
uninstall).

1) How do I abort/rollback the installation if the data the
user provides in the form is not correct? From the
installer that shows the form I have tried:
this.parent.rollback()
but it dosent seem to rollback what the other installer
has installed.

2) The form that I use to collect data during setup is also
made available from the users programs menu. The form shows up
as "someform.exe" in the menu. How do I give the entry a
name other than the filename? (I added it by rightclicking
the setupproject then selecting view->file system and adding
the form to the user's program menu node).

Nov 16 '05 #2
How can i return a code from an installer?

This is how the installer looks thats opens a form during install:

[RunInstaller(true)]
public class InitServerInstaller : Installer
{
public InitServerInstaller() :base()
{
}

public override void Install(IDictionary savedState)
{
base.Install(savedState);

InitServerForm form = new InitServerForm();
if (form.ShowDialog() == DialogResult.OK) {
}
else {

}
}

}

"Phil Wilson" <pd*******@nospam.cox.net> wrote in message news:<ek**************@TK2MSFTNGP10.phx.gbl>...
1) Is to throw an InstallException from the installer class method being
called. However it's not clear to me what you're doing - it looks like
you're running a program as a custom action, so if the custom action is set
up to abort if it fails, try returning a non-zero exit code from the
program.

2) Seems to be a Windows Forms question.

What you're doing is not recommended because runnning UI from the execute
sequence is "a bad thing. You should insert a dialog into the UI sequence
and collect your data there into properties that you use in custom actions
etc later on.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"TDOR" <tj*****@hotmail.com> wrote in message
news:12**************************@posting.google.c om...
Using VS2003 I have created a solution containing 2
c# projects and one setup project. One c# project is
a nt service and a project installer for the service.
The second c# project is a form and an installer to
show the form during the install process. Primary
output from both these projects has been added to the
setup project and to custom actions (install/commit/rollback/
uninstall).

1) How do I abort/rollback the installation if the data the
user provides in the form is not correct? From the
installer that shows the form I have tried:
this.parent.rollback()
but it dosent seem to rollback what the other installer
has installed.

2) The form that I use to collect data during setup is also
made available from the users programs menu. The form shows up
as "someform.exe" in the menu. How do I give the entry a
name other than the filename? (I added it by rightclicking
the setupproject then selecting view->file system and adding
the form to the user's program menu node).

Nov 16 '05 #3
You don't return a code from an Installer method, it's a void method, and
you throw an InstallException if you want to abort the installation. What do
you want to do with the "code"? I don't understand the big picture here -
you're talking about forms and data, but I can't tell what you're actually
trying to accomplish with the forms program and the data.
--
Phil Wilson
[MVP Windows Installer]
"TDOR" <tj*****@hotmail.com> wrote in message
news:12*************************@posting.google.co m...
How can i return a code from an installer?

This is how the installer looks thats opens a form during install:

[RunInstaller(true)]
public class InitServerInstaller : Installer
{
public InitServerInstaller() :base()
{
}

public override void Install(IDictionary savedState)
{
base.Install(savedState);

InitServerForm form = new InitServerForm();
if (form.ShowDialog() == DialogResult.OK) {
}
else {

}
}

}

"Phil Wilson" <pd*******@nospam.cox.net> wrote in message

news:<ek**************@TK2MSFTNGP10.phx.gbl>...
1) Is to throw an InstallException from the installer class method being
called. However it's not clear to me what you're doing - it looks like
you're running a program as a custom action, so if the custom action is set up to abort if it fails, try returning a non-zero exit code from the
program.

2) Seems to be a Windows Forms question.

What you're doing is not recommended because runnning UI from the execute sequence is "a bad thing. You should insert a dialog into the UI sequence and collect your data there into properties that you use in custom actions etc later on.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"TDOR" <tj*****@hotmail.com> wrote in message
news:12**************************@posting.google.c om...
Using VS2003 I have created a solution containing 2
c# projects and one setup project. One c# project is
a nt service and a project installer for the service.
The second c# project is a form and an installer to
show the form during the install process. Primary
output from both these projects has been added to the
setup project and to custom actions (install/commit/rollback/
uninstall).

1) How do I abort/rollback the installation if the data the
user provides in the form is not correct? From the
installer that shows the form I have tried:
this.parent.rollback()
but it dosent seem to rollback what the other installer
has installed.

2) The form that I use to collect data during setup is also
made available from the users programs menu. The form shows up
as "someform.exe" in the menu. How do I give the entry a
name other than the filename? (I added it by rightclicking
the setupproject then selecting view->file system and adding
the form to the user's program menu node).

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Piotrek Stachowicz | last post by:
Hi, Sorry, it's gonna be a bit off-topic but I'm looking for experienced ..NET (c#) developers and I guess there're quite many here. I'm looking for a topic for my final year project (B.sc). It...
7
by: Martin Strojek | last post by:
Hi, I have the following problem with developing some web site. I use Visual Studio 2003 to build a website. I tried Windows 2003 Server and switched now back to Windows XP with PWS but the...
0
by: Jobs | last post by:
All answers to the below interview questions are at http://www.geocities.com/dotnetinterviews/ or you can download the complete answer zip file from...
29
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
6
by: manojchhabria13 | last post by:
Hi can anyone plz suggest me few good topics for project in .net ? Anyone have any idea on artificial intelligence ?
24
by: =?Utf-8?B?RHIuIFMu?= | last post by:
I am incorporating three existing programs into a new "all in one" program. I have added the three projects to the new all in one project. How do I instruct the new initial menu to launch the main...
4
MMcCarthy
by: MMcCarthy | last post by:
http://bytes.com/images/howtos/projectscope_blocks.jpgAs a freelance IT consultant for over 10 years, I’ve come to appreciate well defined project scopes. A project scope is a common understanding...
0
by: LoganSquareDon | last post by:
Please distribute this email. Data on both agile and plan-driven projects are welcome. Dear To Whom It May Concern, My name is Donald Buresh, and I am a Ph.D. student at Northcentral...
7
by: adfghergaer | last post by:
First of all, I'm not a programmer. I'm here because I had an idea for a software program that my employer may hire someone to design, and I'm wondering what kind of investment it would take to hire...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.