Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disabling repair option from installer.

1,577 views
Skip to first unread message

Arindam

unread,
Dec 17, 2007, 1:25:01 AM12/17/07
to
Hi All,
I have made an installer packege from visual studio setup wizard. The repair
option is not working correctly. So I want to disable the repair option. I am
using orca.exe to modify my windows installer but I dont know much of it.
Can any body send me detail steps to do it.

Thanking you in advance.

Regards
Arindam

Johannes Passing

unread,
Dec 17, 2007, 2:36:54 AM12/17/07
to
See ARPNOREPAIR:
http://msdn2.microsoft.com/en-us/library/aa367592.aspx

Go to the propery table, add an entry for ARPNOREPAIR and set its value
to 1.

--Johannes


--
Johannes Passing - http://int3.de/

Richard [Microsoft Windows Installer MVP]

unread,
Dec 17, 2007, 4:31:11 AM12/17/07
to
[Please do not mail me a copy of your followup]

=?Utf-8?B?QXJpbmRhbQ==?= <Ari...@discussions.microsoft.com> spake the secret code
<4E2B8585-BCFB-4083...@microsoft.com> thusly:

>I have made an installer packege from visual studio setup wizard. The repair
>option is not working correctly.

What specifically is going wrong? Its better to fix the bug in repair
than to disable repair. Repair is really quite useful and you'd be
better off supporting it than disabling it.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

Arindam

unread,
Dec 17, 2007, 5:46:01 AM12/17/07
to
Thanks for your reply.
My installer includes one windows service, one exe and a dll. The windows
service runs in user mode. Now I am doing some steps
1. Installing the product , it is prompting me to give username password (as
the windows service is user mode). After installation it is working fine.
2.Now if I again double-click the Installer, installer maintanance form
appears asking remove or repair. Remove is working correct. If i choose
repair option it is asking for username and password and at the end of repair
it is giving a message box "Specified service already exists".
3.When I am double-clicking the installed exe shortcut (the installer
creates desktop shortcut for exe)instead of opening the exe file, it is
opening installation wizard again and giving message specified service
already exist.
So install and next repair can't open the exe file.
It will be great if you can point out what is wrong giong on here.

Another thing I like to ask is how to remove the Remove/Repair radio button
from the maintainance form so that from Control-Panel Add-Remove program and
Installer only remove operation can be done. At least doing this thing can
temporarily solve my purpose.


>Go to the propery table, add an entry for ARPNOREPAIR and set its value
>to 1.

I opened the property table of my istaller in orca.exe added a new row
property=ARPNOREPAIR and value =1, but is is not working.

Thanking you in advance.
Regards
Arindam

Johannes Passing

unread,
Dec 17, 2007, 9:28:00 AM12/17/07
to
Arindam wrote:
> Thanks for your reply.
> My installer includes one windows service, one exe and a dll. The windows
> service runs in user mode. Now I am doing some steps
> 1. Installing the product , it is prompting me to give username password (as
> the windows service is user mode). After installation it is working fine.
> 2.Now if I again double-click the Installer, installer maintanance form
> appears asking remove or repair. Remove is working correct. If i choose
> repair option it is asking for username and password and at the end of repair
> it is giving a message box "Specified service already exists".
How do you install the service - are you using the ServiceInstall table
or do you use a custom action for that?

> Another thing I like to ask is how to remove the Remove/Repair radio button
> from the maintainance form so that from Control-Panel Add-Remove program and
> Installer only remove operation can be done. At least doing this thing can
> temporarily solve my purpose.
>> Go to the propery table, add an entry for ARPNOREPAIR and set its value
>> to 1.
> I opened the property table of my istaller in orca.exe added a new row
> property=ARPNOREPAIR and value =1, but is is not working.

Sorry, I misunderstood your question - ARPNOREPAIR hides the Repair
button in the Add/Remove Software control panel applet. If you want to
remove the repair option from the UI, you have to edit the Control
table. But as Richard suggested, it is much better to get Repair working
than to try to disable it. After all, Repair is a pretty useful feature.

--Johannes


> "Richard [Microsoft Windows Installer MVP" wrote:
>
>> [Please do not mail me a copy of your followup]
>>
>> =?Utf-8?B?QXJpbmRhbQ==?= <Ari...@discussions.microsoft.com> spake the secret code
>> <4E2B8585-BCFB-4083...@microsoft.com> thusly:
>>
>>> I have made an installer packege from visual studio setup wizard. The repair
>>> option is not working correctly.
>> What specifically is going wrong? Its better to fix the bug in repair
>> than to disable repair. Repair is really quite useful and you'd be
>> better off supporting it than disabling it.
>> --
>> "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
>> <http://www.xmission.com/~legalize/book/download/index.html>
>>
>> Legalize Adulthood! <http://blogs.xmission.com/legalize/>
>>

Phil Wilson

unread,
Dec 17, 2007, 1:58:41 PM12/17/07
to
You've run into an issue with the fact that Visual Studio setups install
services with custom action code instead of built-in MSI functionality. The
result is that your code is running again on a repair. The fix is to have a
condition (case sensitive) of Not Installed on your install custom action.
That way first install will install the service and repair will not try to
do it again.
--
Phil Wilson
[MVP Windows Installer]

"Arindam" <Ari...@discussions.microsoft.com> wrote in message
news:3E72FD71-B242-4AF3...@microsoft.com...

Richard [Microsoft Windows Installer MVP]

unread,
Dec 17, 2007, 3:22:08 PM12/17/07
to
[Please do not mail me a copy of your followup]

"Phil Wilson" <phil....@wonderware.something.com> spake the secret code
<O7c9X7NQ...@TK2MSFTNGP05.phx.gbl> thusly:

>That way first install will install the service and repair will not try to
>do it again.

But if you do that, then your service won't be repaired.

I'd recommend using WiX <http://wix.sourceforge.net> instead of Visual
Studio and use the standard tables for installing and configuring
services. If you do that, then repair will properly repair your
service installation.

Phil Wilson

unread,
Dec 17, 2007, 6:40:54 PM12/17/07
to
It's true that the service won't be repaired, but (and I thought about
putting this in my first reply) the installer classes don't know anything
about repair anyway. When repair kicks in they fail because the service is
already installed. A smarter implementation of installer classes (if
setup&deployment projects insist on using them) woud have been to pass extra
data so that the installer classes could check ("repair") the service. For
the people stuck with this err .. "unfortunate" implementatation the only
practical solution is to avoid calling the install custom action again. It's
either that or they implement their own code to check the service.

IIRC VS 2008 has made this even more interesting. RemoveExistingProducts is
now near the end of the execute sequence, so if a Visual Studio setup is
major upgrading an installed product with a service the install of the new
product runs before the old service is uninstalled, and yup, it fails with
"service already installed".

I attempted to help VS devs deal with this issue with this tool:

http://www.installsite.org/pages/en/msi/tips.htm - Installing Services with
Visual Studio - a tool that populates the service tables from Xml so
installer classes can be avoided.


--
Phil Wilson
[MVP Windows Installer]

"Richard [Microsoft Windows Installer MVP]"
<legaliz...@mail.xmission.com> wrote in message
news:u7mcAqOQ...@TK2MSFTNGP05.phx.gbl...

Arindam

unread,
Dec 18, 2007, 4:25:02 AM12/18/07
to

Thanks for your reply.
From your reply I understand there are two ways to solve this problem.
1.

>The fix is to have a
>condition (case sensitive) of Not Installed on your install custom action.

I am not familier with custom action conditional statements, can you give me
one example?

2.


>A smarter implementation of installer classes (if
> setup&deployment projects insist on using them) woud have been to pass extra
> data so that the installer classes could check ("repair") the service

My service has a installer class derived from Installer. I am also
overriding Install and Uninstall methods. Both of these methods call base
class methods at end ( Install calls base.install(savedState)).
How can I pass extra information to these methods so that I can distiguish
between Repair and Install?
If some how in Install method I dectect that it is a repair what should I do
next?
Because not calling base.Install(savedState) gives invalid argument exception.

Thanks in advance.
Regards
Arindam

Christopher Painter

unread,
Dec 18, 2007, 10:44:10 AM12/18/07
to
This reminds me of a previous job where they had over 1500 installer
class CA's. One particular project had some CA's for handling a
service. One day I had a defect logged by a developer against the
installer saying that an error occurred during uninstall and that the
(un)install rolledback and the package couldn't be removed.

Upon investigation I discovered that the developer had manually
removed the service with the SC command and that in *HIS* installer
class he didn't have any exception handling inside HIS uninstall CA.
I showed this to him and he just stared at me and said it's an install
defect so I needed to fix it.

Two morals of the story: Don't let friends write Installer Class CA's
and if they insist, always, always handle all errors.

Back to this thread... I'm not sure why a CA would need to know it's
doing a repair. It just needs to know that it is servicing an action
state local request and to handle all errors that might occur.

Phil Wilson

unread,
Dec 18, 2007, 2:22:16 PM12/18/07
to
1. Highlight the install custom action, then right click->Properties window.

2. If you passed in myarg=/[Installed] then your installer class could see
that myarg has a value, and assume that the service needs repairing, but
keep in mind that this whole installer class thing for installing services
is a complete pain. And you're writing tons of code for something that MSI
does for free anyway. It's ironic that people complain about the cost (or
complexity) of full-strength installers, and then spend time and money
trying to make complicated installer classes work. Not calling
base.Install() is just another of the bear traps in there.


--
Phil Wilson
[MVP Windows Installer]

"Arindam" <Ari...@discussions.microsoft.com> wrote in message
news:625E0496-9C6F-47FF...@microsoft.com...

kavithakavitha

unread,
Dec 8, 2008, 9:18:56 AM12/8/08
to
If you want to
remove the repair option from the UI, you have to edit the Control
table.

Can you explain me this in detail?
Thanks


Phil Wilson

unread,
Dec 8, 2008, 1:29:21 PM12/8/08
to
Not really, no ;=)

There might be a repair option in the maintenance dialog if you have one.
Basically you'd just look for repair in the ControlEvent table, look at the
documentation for the ControlEvent table and change something (probably the
Attributes value) to hide it.

In case the real issue is that your setup is repairing and doing something
that you don't like:

1) A setup design should take account of the fact that repair will occur.
You cannot stop it happening. There are choices like right-click Repair on
the MSI file and in Add/Remove programs that will do repair. Or Windows
might repair because of interference or overlap with another installed
product. There are things other than shortcuts that can cause it. Hiding
buttons will not stop it happening in all cases.

2) If there are files you do not want restoring during a repair, set their
guids to null in the Component table.

3) If you have a custom action running during a repair that you don't want
to run then its condition is wrong.

I'm saying all this because I suspect you're papering over cracks instead of
addressing some underlying design problem in your install.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


<kavitha kavitha> wrote in message news:200812891...@caramail.com...

Narendra

unread,
Dec 8, 2009, 5:40:53 AM12/8/09
to
Hello Arindam,,

am also facing the similar problem
but in my case it is giving error like 'specified service not found'

i added windows service and two projects outputs to my setup project.
same problem as urs
repair not working
installing and uninstalling working fine.

if i clicked repair then remove also not working.
am using ocra to edit tables of setup project but my problem not solved.

please help me out to disable repair button from my UI of setup project.

Thanks in Advance.
--naren

url:http://www.ureader.com/msg/16531570.aspx

narendrareddyvajrala

unread,
Dec 8, 2009, 6:09:34 AM12/8/09
to
Hello Arindam,

am also facing the similar problem

i have one windows service and two primaryoutputs of other projects.
it is installing and uninstalling fine
but repair giving problem.
when i select repair it is giving error like 'required service not found'.

once i click repair then uninstalling(remove) also not working.

how can i disable the repair option from my setup project.
please help me out

Thanks in Advance
--Naren

Arinda wrote:

Disabling repair option from installer.
17-Dec-07

Thanking you in advance.

Regards
Arindam

Previous Posts In This Thread:

On Monday, December 17, 2007 1:25 AM
Arinda wrote:

Disabling repair option from installer.

Thanking you in advance.

Regards
Arindam

On Monday, December 17, 2007 2:36 AM
Johannes Passing wrote:

Re: Disabling repair option from installer.
See ARPNOREPAIR:
http://msdn2.microsoft.com/en-us/library/aa367592.aspx

Go to the propery table, add an entry for ARPNOREPAIR and set its value
to 1.

--Johannes

Arindam wrote:


--
Johannes Passing - http://int3.de/

On Monday, December 17, 2007 4:31 AM
legalize+jeeve wrote:

[Please do not mail me a copy of your followup]=?Utf-8?B?QXJpbmRhbQ==?


[Please do not mail me a copy of your followup]

=?Utf-8?B?QXJpbmRhbQ==?= <Ari...@discussions.microsoft.com> spake the secret code
<4E2B8585-BCFB-4083...@microsoft.com> thusly:


What specifically is going wrong? Its better to fix the bug in repair
than to disable repair. Repair is really quite useful and you'd be
better off supporting it than disabling it.

--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

On Monday, December 17, 2007 5:46 AM
Arinda wrote:

Thanks for your reply.


Thanks for your reply.
My installer includes one windows service, one exe and a dll. The windows
service runs in user mode. Now I am doing some steps
1. Installing the product , it is prompting me to give username password (as
the windows service is user mode). After installation it is working fine.
2.Now if I again double-click the Installer, installer maintanance form
appears asking remove or repair. Remove is working correct. If i choose
repair option it is asking for username and password and at the end of repair
it is giving a message box "Specified service already exists".
3.When I am double-clicking the installed exe shortcut (the installer
creates desktop shortcut for exe)instead of opening the exe file, it is
opening installation wizard again and giving message specified service
already exist.
So install and next repair can't open the exe file.
It will be great if you can point out what is wrong giong on here.

Another thing I like to ask is how to remove the Remove/Repair radio button
from the maintainance form so that from Control-Panel Add-Remove program and
Installer only remove operation can be done. At least doing this thing can
temporarily solve my purpose.

I opened the property table of my istaller in orca.exe added a new row
property=ARPNOREPAIR and value =1, but is is not working.

Thanking you in advance.
Regards
Arindam


"Richard [Microsoft Windows Installer MVP" wrote:

On Monday, December 17, 2007 9:28 AM
Johannes Passing wrote:

Re: Disabling repair option from installer.


Arindam wrote:
How do you install the service - are you using the ServiceInstall table
or do you use a custom action for that?

Sorry, I misunderstood your question - ARPNOREPAIR hides the Repair
button in the Add/Remove Software control panel applet. If you want to

remove the repair option from the UI, you have to edit the Control

table. But as Richard suggested, it is much better to get Repair working
than to try to disable it. After all, Repair is a pretty useful feature.

--Johannes


--
Johannes Passing - http://int3.de/

On Monday, December 17, 2007 1:58 PM
Phil Wilson wrote:

You've run into an issue with the fact that Visual Studio setups install
You've run into an issue with the fact that Visual Studio setups install
services with custom action code instead of built-in MSI functionality. The

result is that your code is running again on a repair. The fix is to have a

condition (case sensitive) of Not Installed on your install custom action.

That way first install will install the service and repair will not try to
do it again.

--
Phil Wilson
[MVP Windows Installer]

"Arindam" <Ari...@discussions.microsoft.com> wrote in message

news:3E72FD71-B242-4AF3...@microsoft.com...

On Monday, December 17, 2007 3:22 PM
legalize+jeeve wrote:

[Please do not mail me a copy of your followup]"Phil Wilson" <phil.
[Please do not mail me a copy of your followup]

"Phil Wilson" <phil....@wonderware.something.com> spake the secret code
<O7c9X7NQ...@TK2MSFTNGP05.phx.gbl> thusly:

But if you do that, then your service won't be repaired.

I'd recommend using WiX <http://wix.sourceforge.net> instead of Visual
Studio and use the standard tables for installing and configuring
services. If you do that, then repair will properly repair your
service installation.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

On Monday, December 17, 2007 6:40 PM
Phil Wilson wrote:

On Tuesday, December 18, 2007 4:25 AM
Arinda wrote:

Thanks for your reply.


Thanks for your reply.
From your reply I understand there are two ways to solve this problem.
1.

I am not familier with custom action conditional statements, can you give me
one example?

2.

My service has a installer class derived from Installer. I am also

overriding Install and Uninstall methods. Both of these methods call base
class methods at end ( Install calls base.install(savedState)).
How can I pass extra information to these methods so that I can distiguish
between Repair and Install?
If some how in Install method I dectect that it is a repair what should I do
next?
Because not calling base.Install(savedState) gives invalid argument exception.

Thanks in advance.
Regards
Arindam


"Phil Wilson" wrote:

On Tuesday, December 18, 2007 2:22 PM
Phil Wilson wrote:

1. Highlight the install custom action, then right click->Properties window.2.
1. Highlight the install custom action, then right click->Properties window.

2. If you passed in myarg=/[Installed] then your installer class could see
that myarg has a value, and assume that the service needs repairing, but
keep in mind that this whole installer class thing for installing services
is a complete pain. And you're writing tons of code for something that MSI
does for free anyway. It's ironic that people complain about the cost (or
complexity) of full-strength installers, and then spend time and money
trying to make complicated installer classes work. Not calling
base.Install() is just another of the bear traps in there.
--
Phil Wilson
[MVP Windows Installer]

"Arindam" <Ari...@discussions.microsoft.com> wrote in message
news:625E0496-9C6F-47FF...@microsoft.com...

On Wednesday, December 19, 2007 2:18 AM
Christopher Painter wrote:

On Monday, December 08, 2008 9:18 AM
kavitha kavitha wrote:

disable repair option


If you want to
remove the repair option from the UI, you have to edit the Control
table.

Can you explain me this in detail?
Thanks


Submitted via EggHeadCafe - Software Developer Portal of Choice
Documenting Exceptional Developers!
http://www.eggheadcafe.com/tutorials/aspnet/fc9142ae-d54b-4591-9bde-48c249ae8247/documenting-exceptional-d.aspx

0 new messages