[lnkForumImage]
TotalShareware - Download Free Software

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


 

JerryWEC

7/12/2007 11:14:00 PM

Hi all! Package and Deployment questions using the setup project (VB.net
2005)...

Q1] I'm wanting to know if there is an easy way to call an .exe with
switches with out having to use a custom action? I want to call regasm.exe
with a /tlb: switch. I know this should work with a custom action and a
installer class but It seems like there should be a way to invoke an
executable after the installation.

Q2] If you create a custom action and need to add a installer class to add
custom code for the install and uninstall overidable mehods, then can you
add this class library to any class library in your solution or can you
create new class library and add the installer to that class library?

Q3] I really don't want to add this installer code to my existing classes.
I'm also thinking I'd like to start a deploy class library for the
customized but standard things I need to do like registering object for COM,
invoking .exe, running .bat files, etc... Any suggestions on last comment?

Q4] Related to Q1, how do you run a .bat file without using a custom action
in your setup project? Or do you need to do a custom action?

TIA!!! Jerry


6 Answers

Phil Wilson

7/13/2007 12:17:00 AM

0

Inline.....
--
Phil Wilson
[MVP Windows Installer]

"JerryWEC" <JerryWEC@newsgroups.nospam> wrote in message
news:eNokZpNxHHA.4076@TK2MSFTNGP06.phx.gbl...
> Hi all! Package and Deployment questions using the setup project (VB.net
> 2005)...
>
> Q1] I'm wanting to know if there is an easy way to call an .exe with
> switches with out having to use a custom action? I want to call regasm.exe
> with a /tlb: switch. I know this should work with a custom action and a
> installer class but It seems like there should be a way to invoke an
> executable after the installation.


[[ You don't need to. Use tlbexp to create the typelib on your dev system,
add the tlb file to your setup project and mark the Register property (I
think the project will give it the right registration property value
automatically). ]]

> Q2] If you create a custom action and need to add a installer class to add
> custom code for the install and uninstall overidable mehods, then can you
> add this class library to any class library in your solution or can you
> create new class library and add the installer to that class library?

[[ If you're just running your own managed code and not using existing
installer classes (like ServiceInstallers) there's no advantage to Installer
classes, and lots of gotchas. Just pass the parameters and property values
to a command line managed code executable. ]]

Q3] I really don't want to add this installer code to my existing classes.
> I'm also thinking I'd like to start a deploy class library for the
> customized but standard things I need to do like registering object for
> COM, invoking .exe, running .bat files, etc... Any suggestions on last
> comment?

[[ COM registration can be done for you by the setup project - that Register
property again - and see Q3 response. ]]

Q4] Related to Q1, how do you run a .bat file without using a custom action
> in your setup project? Or do you need to do a custom action?

[[You need a custom action. It depends what the bat file does though -
everything specific you've asked about so far can be done with setup project
features. ]]
>
> TIA!!! Jerry
>


JerryWEC

7/13/2007 4:51:00 PM

0

Phil, thanks for your responses. I guess I'm looking for a good source of
information regarding how do do a complete custom installation using the
setup & deployment project. I have read everything on the subject in my
ebooks. Now I'm looking for a good book.

I'm getting the following messages while trying to build my package....
WARNING: Unable to create registration information for file named
'PLCInterface.exe'

WARNING: Unable to create registration information for file named
'CLA_WMWrapper.tlb'

WARNING: Unable to create registration information for file named
'CLA_Logging.tlb'

For CLA_WMWrapper.tlb file I added this as a file and have the following
properies set.

Folder: Application Folder
PackageAs: vsdpaDefault
Register: vsdrfCOM
SharedLegacyFile: False
TargetName: CLA_WMWrapper.tlb
Vital: True
All other properties set to False.

I can regenerate the .tlb file using RegAsm.exe on my target machine
manually!

Note: My Solution packages create my .tlb file(s) during the build process.

It would be nice to know why this installation package (Setup and Deployment
project) is getting this warning and not registering my .tlb files.

I know that during the build process this .reg file is suppose to be created
and put into the .msi but I don't see any reference to any .reg file i the
output.

Good Link:
http://www.simple-talk.com/content/print.aspx?a...

Any help please! Jerry.


JerryWEC

7/13/2007 5:07:00 PM

0

Note: I had this attribute before my class.

<ProgId("CLA_WeldMonitor.WMWrapper")> _

So all other progIDs are being generated if at all. This one suggestion
from MSDN help for the previously posted warnings.

Help! Jerry


JerryWEC

7/13/2007 5:14:00 PM

0

Btw this Great Link below was written by Phil Wilson:
http://www.simple-talk.com/content/print.aspx?a...

Thanks Phil! This is the best reference on the web I have found.


Phil Wilson

7/15/2007 1:11:00 AM

0

You might find this one useful too:

http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com...
--
Phil Wilson
[Microsoft MVP-Windows Installer]
"JerryWEC" <JerryWEC@newsgroups.nospam> wrote in message
news:%23IKuIBXxHHA.4352@TK2MSFTNGP05.phx.gbl...
> Note: I had this attribute before my class.
>
> <ProgId("CLA_WeldMonitor.WMWrapper")> _
>
> So all other progIDs are being generated if at all. This one suggestion
> from MSDN help for the previously posted warnings.
>
> Help! Jerry
>


JerryWEC

7/16/2007 4:16:00 PM

0

Phil, I did start to read this Friday and have read most of it now. I
started to think I should manually create the .tlb file using tlbexp.exe
like you say in your paper.

So I manually deleted the .tlb file and regenerated it manually using
tlbexp.exe and then added it as a file and the setup package still can't
generate the required data for the setup. I keep getting the warning as
previouly described... "WARNING: unable to create registration information
for file named 'CLA_WMWrapper.tlb'". I get this message for all .tlb files
added to the setup.

I'm also getting the following error when trying to view the .tlb file...
(via double-clicking the .tlb file)
Title: OLE/COM Object Viewer
Msg: MkParseDisplayName(...
""I:\DEV\CLA_WeldMonitor\CLA_WMWrapper\bin\Release\CLA_WMWrapper.tlb""...)
faild. Invalid syntax MK_E_SYNTAX (#800401E4)

Phil, could I have something wrong on my development machine and my
deployment test box is fine? When I install the package on the test box and
manually regenerate the .tlb file using RegAsm.exe the new .tlb file is
registered and works fine?

I'd really like to be able to have the setup package generate the .tlb file
and register it on the test and production machines.

Any help is greatly appreciated. (I've never been able to view the .tlb
files on my dev box)

Jerry