473,395 Members | 1,680 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,395 software developers and data experts.

Deploy assembly to COM+ via Custom Action .vbs

I was unable to find information here on how to do this, so I am
posting the solution for the benefit of all.

If you want to create a custom action in a .NET deployment project to
register your assembly into COM+ (via regsvcs), and do this through a
vbs script, this code works.

When you add your customaction.vbs to the "Install" custom action, you
need to add [TARGETDIR] to the CustomActionData property. This will
tell the script where the dll is going, and then we can extract this
in the vbs script with the Session.Property object.

Code:

targetDir = Session.Property("CustomActionData")

doscmd = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\regs vcs.exe """
+ targetDir + "\myassembly.dll"""

set shell = createobject("Wscript.Shell")
shell.Run doscmd, 1, true

This will display the command window and will wait for the
registration to complete before continuing with the installation.

Hope this helps someone.
Jul 21 '05 #1
0 2432

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

Similar topics

1
by: Wilson Ricardo Passos Oliveira | last post by:
Hi fellows, I have two simple questions regarding the Framework's deploy and the Setup and Deploy Projects: 1. As I've read in another posts and newsgroups (and as I can imagine), VS.NET...
0
by: mqsash | last post by:
Hi Problem : Unable to deploy an assembly in IE, as a cab file. (Works fine when deployed as a dll ) Description : I have created a assembly (dll with no user interface)in C# which I deploy in...
2
by: hitendra15 | last post by:
How to Deploy SQL server Database to another PC, How to create a package that craetes Database as well as ODBC driver for accessing data at enduser PC, using .Net VB
2
by: mqsash | last post by:
Hi Problem : Unable to deploy an assembly in IE, as a cab file. (Works fine when deployed as a dll ) Description : I have created a assembly (.dll) in C# which I deploy in IE. The dll name is...
0
by: Jeff Jorczak | last post by:
I was unable to find information here on how to do this, so I am posting the solution for the benefit of all. If you want to create a custom action in a .NET deployment project to register your...
10
by: =?Utf-8?B?SmFjayBTbWl0aA==?= | last post by:
Hello, I have a solution that contains a C# application that is installed and runs as a service. The solution also contains several DLLs, some of which are C# assemblies and some are C++ DLLs. ...
0
by: Monty | last post by:
I have an installation package for my web application which has worked well. After rebuilding the package and running install, I began receiving this error message: Error 1001. Unable to get...
0
by: azoapes | last post by:
Hi, I've made a Setup Project to my C# WinApp and added a custom dialog to it that asks for user/pass for a database server. Then I created a Custom Action class and override the Install() to check...
0
by: =?Utf-8?B?RHVuZTg4?= | last post by:
Hi there, We're using a Web Deployment project to deploy our web app and that works fine. However, we've written a little Windows Forms utility for our client that we'd like deploy with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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:
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.