[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Rollbacking from custom action

Matt

9/19/2006 5:48:00 AM

Hello

I have 2 questions

1. While installing my installtion ahs to check for parent application
version.
It is there in the registry. say HKLM/software/MyApp Version
How to write a launch condition to check the verion greater than 6.0?

2. I have created a dll and have overwritten Install function in the dll.
In the Install function i create sql server database and tables.
How to abort / rollback if the databse/tablle creation fails.

I am using VS 2005 setup wizard.

regards

Mathew


4 Answers

Phil Wilson

9/21/2006 3:15:00 PM

0

I don't know what parent application means exactly, but there won't be a
version key unless that app put it there. There's a search for a Windows
Installer component, that could work if you can identify a component guid
from that parent app and it's an MSI install.

I'm guessing you're doing this with an installer class or an executable. If
it's an installer class, throw an installexception and add a rollback custom
action that undoes what you added to the system in your code. If it's an
executable, return a non-zero exit code and similarly clean up with a
rollback custom action or do it in the program before you return.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.ht...

"Matt" <matt12345@newsgroup.nospam> wrote in message
news:CD880C85-C81C-4B7A-B398-A5B058A51A27@microsoft.com...
> Hello
>
> I have 2 questions
>
> 1. While installing my installtion ahs to check for parent application
> version.
> It is there in the registry. say HKLM/software/MyApp Version
> How to write a launch condition to check the verion greater than 6.0?
>
> 2. I have created a dll and have overwritten Install function in the dll.
> In the Install function i create sql server database and tables.
> How to abort / rollback if the databse/tablle creation fails.
>
> I am using VS 2005 setup wizard.
>
> regards
>
> Mathew
>
>


Matt

9/26/2006 1:39:00 AM

0

Hi Phil,

Second question is clear now but i am not sure about the first one.

I am using Setup wizard of Visual studio 2005 to create an MSI.

Suppose i have an app "Parent", its version will be there in the registry
set by "Parents"'s installer say HKLM\software\Parent . I have deleloped an
App "Child" which needs Parent of version 5 or later.
Now i have to read the parent's Version from the lauch condition. and have
to abort if the version < 5. How to achive this?

the windows installer allows me to check whether version key is available in
the registry. but how do i compare the value of version, before installing.

regards

Matt.


"Phil Wilson" wrote:

> I don't know what parent application means exactly, but there won't be a
> version key unless that app put it there. There's a search for a Windows
> Installer component, that could work if you can identify a component guid
> from that parent app and it's an MSI install.
>
> I'm guessing you're doing this with an installer class or an executable. If
> it's an installer class, throw an installexception and add a rollback custom
> action that undoes what you added to the system in your code. If it's an
> executable, return a non-zero exit code and similarly clean up with a
> rollback custom action or do it in the program before you return.
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
> Definitive Guide to Windows Installer
> http://apress.com/book/bookDisplay.ht...
>
> "Matt" <matt12345@newsgroup.nospam> wrote in message
> news:CD880C85-C81C-4B7A-B398-A5B058A51A27@microsoft.com...
> > Hello
> >
> > I have 2 questions
> >
> > 1. While installing my installtion ahs to check for parent application
> > version.
> > It is there in the registry. say HKLM/software/MyApp Version
> > How to write a launch condition to check the verion greater than 6.0?
> >
> > 2. I have created a dll and have overwritten Install function in the dll.
> > In the Install function i create sql server database and tables.
> > How to abort / rollback if the databse/tablle creation fails.
> >
> > I am using VS 2005 setup wizard.
> >
> > regards
> >
> > Mathew
> >
> >
>
>
>

Phil Wilson

9/27/2006 4:59:00 PM

0

In the launch condition stuff there's a search target machine that does a
registry search, that can set a property yo check in the actual launch
conditions. This might help, seaches are described:
http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup...
--
Phil Wilson
[Microsoft MVP Windows Installer]

"Matt" <matt12345@newsgroup.nospam> wrote in message
news:8E684EEB-AA30-43F8-989A-D25FDAEAADF4@microsoft.com...
> Hi Phil,
>
> Second question is clear now but i am not sure about the first one.
>
> I am using Setup wizard of Visual studio 2005 to create an MSI.
>
> Suppose i have an app "Parent", its version will be there in the registry
> set by "Parents"'s installer say HKLM\software\Parent . I have deleloped
> an
> App "Child" which needs Parent of version 5 or later.
> Now i have to read the parent's Version from the lauch condition. and have
> to abort if the version < 5. How to achive this?
>
> the windows installer allows me to check whether version key is available
> in
> the registry. but how do i compare the value of version, before
> installing.
>
> regards
>
> Matt.
>
>
> "Phil Wilson" wrote:
>
>> I don't know what parent application means exactly, but there won't be a
>> version key unless that app put it there. There's a search for a Windows
>> Installer component, that could work if you can identify a component guid
>> from that parent app and it's an MSI install.
>>
>> I'm guessing you're doing this with an installer class or an executable.
>> If
>> it's an installer class, throw an installexception and add a rollback
>> custom
>> action that undoes what you added to the system in your code. If it's an
>> executable, return a non-zero exit code and similarly clean up with a
>> rollback custom action or do it in the program before you return.
>> --
>> Phil Wilson
>> [Microsoft MVP-Windows Installer]
>> Definitive Guide to Windows Installer
>> http://apress.com/book/bookDisplay.ht...
>>
>> "Matt" <matt12345@newsgroup.nospam> wrote in message
>> news:CD880C85-C81C-4B7A-B398-A5B058A51A27@microsoft.com...
>> > Hello
>> >
>> > I have 2 questions
>> >
>> > 1. While installing my installtion ahs to check for parent application
>> > version.
>> > It is there in the registry. say HKLM/software/MyApp Version
>> > How to write a launch condition to check the verion greater than 6.0?
>> >
>> > 2. I have created a dll and have overwritten Install function in the
>> > dll.
>> > In the Install function i create sql server database and tables.
>> > How to abort / rollback if the databse/tablle creation fails.
>> >
>> > I am using VS 2005 setup wizard.
>> >
>> > regards
>> >
>> > Mathew
>> >
>> >
>>
>>
>>


Matt

9/28/2006 7:41:00 AM

0

Thanks alot.

"Phil Wilson" wrote:

> In the launch condition stuff there's a search target machine that does a
> registry search, that can set a property yo check in the actual launch
> conditions. This might help, seaches are described:
> http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup...
> --
> Phil Wilson
> [Microsoft MVP Windows Installer]
>
> "Matt" <matt12345@newsgroup.nospam> wrote in message
> news:8E684EEB-AA30-43F8-989A-D25FDAEAADF4@microsoft.com...
> > Hi Phil,
> >
> > Second question is clear now but i am not sure about the first one.
> >
> > I am using Setup wizard of Visual studio 2005 to create an MSI.
> >
> > Suppose i have an app "Parent", its version will be there in the registry
> > set by "Parents"'s installer say HKLM\software\Parent . I have deleloped
> > an
> > App "Child" which needs Parent of version 5 or later.
> > Now i have to read the parent's Version from the lauch condition. and have
> > to abort if the version < 5. How to achive this?
> >
> > the windows installer allows me to check whether version key is available
> > in
> > the registry. but how do i compare the value of version, before
> > installing.
> >
> > regards
> >
> > Matt.
> >
> >
> > "Phil Wilson" wrote:
> >
> >> I don't know what parent application means exactly, but there won't be a
> >> version key unless that app put it there. There's a search for a Windows
> >> Installer component, that could work if you can identify a component guid
> >> from that parent app and it's an MSI install.
> >>
> >> I'm guessing you're doing this with an installer class or an executable.
> >> If
> >> it's an installer class, throw an installexception and add a rollback
> >> custom
> >> action that undoes what you added to the system in your code. If it's an
> >> executable, return a non-zero exit code and similarly clean up with a
> >> rollback custom action or do it in the program before you return.
> >> --
> >> Phil Wilson
> >> [Microsoft MVP-Windows Installer]
> >> Definitive Guide to Windows Installer
> >> http://apress.com/book/bookDisplay.ht...
> >>
> >> "Matt" <matt12345@newsgroup.nospam> wrote in message
> >> news:CD880C85-C81C-4B7A-B398-A5B058A51A27@microsoft.com...
> >> > Hello
> >> >
> >> > I have 2 questions
> >> >
> >> > 1. While installing my installtion ahs to check for parent application
> >> > version.
> >> > It is there in the registry. say HKLM/software/MyApp Version
> >> > How to write a launch condition to check the verion greater than 6.0?
> >> >
> >> > 2. I have created a dll and have overwritten Install function in the
> >> > dll.
> >> > In the Install function i create sql server database and tables.
> >> > How to abort / rollback if the databse/tablle creation fails.
> >> >
> >> > I am using VS 2005 setup wizard.
> >> >
> >> > regards
> >> >
> >> > Mathew
> >> >
> >> >
> >>
> >>
> >>
>
>
>