Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Deploy/register custom dll's to system directory
 

Deploy/register custom dll's to system directory

Hi all
I have developed few .net 2005/2008 applications and built the deployment package including the custom .dll files.
By default the custom .dll files and report .dll files, included in the main project, are installed/copied to the app.path. If i remove the .dll files from the application path, it produces error in the deployed application.

I need to change this default copy/registration location to windows\system folder, within my installation/deployment package.

How can i make the selected dll's to get copied/installed into the <windowspath>\<syspath> either withinthe deployment project or running regasm internally.

Even they are installed in <windows>\<syspath>, my application should work which has got custom controls.

Is there any special class needed for that?, My googling in the forum resulted no result for this...

expecting any ideas....

thanks
  • Moved byMartin Xie - MSFTMSFTTuesday, September 29, 2009 11:35 AMMove it to ClickOnce and Setup Deployment forum for better support. (From:Visual Basic IDE)
  •  
hbkelkar  Saturday, September 26, 2009 9:07 AM
I don't understand you correctly but it look like you needs Global Assembly Cache Tool (Gacutil.exe) to do the installation. read more about GAC http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx. if like to do the GAC installation during the deployment, then you may consider to repost your question in setup and deployment forum for better responses http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads


kaymaf

I hope this helps, if that is what you want, just mark it as answer so that we can move on
kaymaf  Saturday, September 26, 2009 4:37 PM

Thank you kaymaf for your friendly help.

Hi hbkelkar,

Here are some tutorials. Hope that can help you.


1. Topic: How to deploya .NET Application with Crystal Reports
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/79399b0d-821e-4ec2-b1f1-92d5963aea27

2. We can't use ClickOnce to install shared components into the GAC (Global Assembly Cache). In fact, you can't do anything out of the ordinary such as creating a database, registering file types, or configuring registry settings.

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/51b8c600-bbc6-41a9-b345-62afa0dddf98

3. We can use theCustom Action feature of Setup Project to specify additional actions to be performed on a target computer during installation.

Tutorials: Custom Actions Editor

Allows you to specify additional actions to be performed on a target computer during installation. Custom actions are contained in .dll, .exe, VBScript, JScript, or Installer class files within your solution.

To access the Custom Actions Editor, right-click a setup/deployment project in Solution Explorer -> click View context menu -> click Custom Actions.

Some examples:
Walkthrough: How to create a Custom Action

This walkthrough demonstrates the process of creating a DLL custom action to direct a user to a Web page at the end of an installation.
Walkthrough: Using a Custom Action to Display a Message at Installation
Walkthrough: Passing Data to a Custom Action


I move it to ClickOnce & Setup Deployment forum for better responses.


Best regards,
Martin Xie


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Martin Xie - MSFT  Tuesday, September 29, 2009 11:35 AM
If you want to use ClickOnce for your main application, you can create an msi and deploy it as a prerequisite to the ClickOnce deployment. This way, you can get your dll's into the GAC, but still use ClickOnce for your main application.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 29, 2009 4:19 PM
If you have an MSI-based setup and you have .NET assemblies you want registering, then you use the File System on Target Machine view to say where you want them installing to, and the properties window for the assembly has a Register property that you set.
Phil Wilson
PhilWilson  Tuesday, September 29, 2009 11:48 PM
I don't understand you correctly but it look like you needs Global Assembly Cache Tool (Gacutil.exe) to do the installation. read more about GAC http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx. if like to do the GAC installation during the deployment, then you may consider to repost your question in setup and deployment forum for better responses http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads


kaymaf

I hope this helps, if that is what you want, just mark it as answer so that we can move on
kaymaf  Saturday, September 26, 2009 4:37 PM
Hi kaymaf,
Thanks for pointing to useful information.
also let me make my point clear here..

I have developed a vb 2005 application and added a deployment project to the main project. The deployment project has added all the necessary controls (.dll's).
On deployment, the controls will get installed (copied) into the application.startup path. If i remove them later or move them to windows\system32 folder (purely to make the startup path clean with only the application binary..) the application run into error not finding the third party control files.
So i need to install/copy some files into windows\system folder with valid registration into GAC and not causing any error into application.

I will take ur point on GACUtil and try to solve it out...

If this can be achieved in the deplpoment project only, pls throw some inputs for me..

thanks for the reply..

hbkelkar  Sunday, September 27, 2009 3:04 PM

Thank you kaymaf for your friendly help.

Hi hbkelkar,

Here are some tutorials. Hope that can help you.


1. Topic: How to deploya .NET Application with Crystal Reports
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/79399b0d-821e-4ec2-b1f1-92d5963aea27

2. We can't use ClickOnce to install shared components into the GAC (Global Assembly Cache). In fact, you can't do anything out of the ordinary such as creating a database, registering file types, or configuring registry settings.

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/51b8c600-bbc6-41a9-b345-62afa0dddf98

3. We can use theCustom Action feature of Setup Project to specify additional actions to be performed on a target computer during installation.

Tutorials: Custom Actions Editor

Allows you to specify additional actions to be performed on a target computer during installation. Custom actions are contained in .dll, .exe, VBScript, JScript, or Installer class files within your solution.

To access the Custom Actions Editor, right-click a setup/deployment project in Solution Explorer -> click View context menu -> click Custom Actions.

Some examples:
Walkthrough: How to create a Custom Action

This walkthrough demonstrates the process of creating a DLL custom action to direct a user to a Web page at the end of an installation.
Walkthrough: Using a Custom Action to Display a Message at Installation
Walkthrough: Passing Data to a Custom Action


I move it to ClickOnce & Setup Deployment forum for better responses.


Best regards,
Martin Xie


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Martin Xie - MSFT  Tuesday, September 29, 2009 11:35 AM
Hi Martin
Thank you for your reply.
Yes, on some googling i found that click-one installation is not the place to add some custom actions.
Ill go through the custom action samples pointed by you.

Thanks again and will comeback on finishing my assignment ;-)


hbkelkar  Tuesday, September 29, 2009 2:58 PM
If you want to use ClickOnce for your main application, you can create an msi and deploy it as a prerequisite to the ClickOnce deployment. This way, you can get your dll's into the GAC, but still use ClickOnce for your main application.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 29, 2009 4:19 PM
If you have an MSI-based setup and you have .NET assemblies you want registering, then you use the File System on Target Machine view to say where you want them installing to, and the properties window for the assembly has a Register property that you set.
Phil Wilson
PhilWilson  Tuesday, September 29, 2009 11:48 PM
Thanks Wilson,
Yes, i am creating an MSI based installation, so your suggestion indeed help me out...

thanks
hbkelkar  Wednesday, September 30, 2009 3:56 PM

You can use google to search for other answers

Custom Search

More Threads

• Multiple databases creation in WIX
• Excluding files from setup project (VS2005)
• No program is installed and no error recived
• How do I reference an installed application?
• Custom Deployment Scenario
• Remove .dll custom action
• Publishing fails without error message
• Specify connection string and WCF End points after ClickOnce Deployment
• how to change the default setup path?
• Installer downloading wrong version of VSTOR