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

regasm /codebase should not required

hi there, i am trying to use a .NET assembly from a Cscript.exe .vbs
(i.e. from COM)
and could not get my .vbs to use my .net dll (gives a 'file not found
error')
unless i used the /codebase parameter when registering .net dll with
regasm.

from what i read,a simple regasm dllname.dll and putting the dll and
cscript.exe in the same folder should be sufficient. /codebase should
not be required.

any other ideas what we could be doing wrong? thx







my original (more verbose) post is below, if required.

hi there! i have a .NET assembly which just generates a random number
rand.dll. i want to use it from a simple Cscript .vbs file using the
createobject vbs command which just instantiates & prints the chosen
number to screen. This requires COM.

A
thus I ticked COM interop in the build options for my class & copied
the Cscript.exe to my \bin folder where i have rand.dll so the
Cscript will be able to find the dll.
I did a regasm /tlb rand.dll & a regasm rand.dll and executed my .vbs .

It gave me a 'file not found error' obviously referring to the dll
which holds the class
B
then i ran regasm /codebase rand.dll and now the vbs executed.
I wanted to avoid using /codebase as I thought having the dll in the
same folder as the COM consumer Cscript would be sufficient. What did I

do wrong in A?
PS futher below is another persons post earlier this month with a
similar problem....
many thanks & Regards,
X

Jan 7 '07 #1
2 5945

xamman wrote:
hi there, i am trying to use a .NET assembly from a Cscript.exe .vbs
(i.e. from COM)
and could not get my .vbs to use my .net dll (gives a 'file not found
error')
unless i used the /codebase parameter when registering .net dll with
regasm.
<snip>

Didn't have any luck with this, also: it seems /codebase is
mandatory... =P

Regards,

Branco.

Jan 8 '07 #2


"xamman" <xa******@yahoo.comwrote in message
news:11*********************@11g2000cwr.googlegrou ps.com...
hi there, i am trying to use a .NET assembly from a Cscript.exe .vbs
(i.e. from COM)
and could not get my .vbs to use my .net dll (gives a 'file not found
error')
unless i used the /codebase parameter when registering .net dll with
regasm.

from what i read,a simple regasm dllname.dll and putting the dll and
cscript.exe in the same folder should be sufficient. /codebase should
not be required.

any other ideas what we could be doing wrong? thx







my original (more verbose) post is below, if required.

hi there! i have a .NET assembly which just generates a random number
rand.dll. i want to use it from a simple Cscript .vbs file using the
createobject vbs command which just instantiates & prints the chosen
number to screen. This requires COM.

A
thus I ticked COM interop in the build options for my class & copied
the Cscript.exe to my \bin folder where i have rand.dll so the
Cscript will be able to find the dll.
I did a regasm /tlb rand.dll & a regasm rand.dll and executed my .vbs .

It gave me a 'file not found error' obviously referring to the dll
which holds the class
B
then i ran regasm /codebase rand.dll and now the vbs executed.
I wanted to avoid using /codebase as I thought having the dll in the
same folder as the COM consumer Cscript would be sufficient. What did I

do wrong in A?
PS futher below is another persons post earlier this month with a
similar problem....
many thanks & Regards,
X

I believe that when you use /codebase, it registers the location of the DLL
within the registry. So, what I would suggest, is if you don't want to use
/codebase, then once you use regasm on the dll, install the dll into the
global assembly cache (GAC). It *should* work, but I haven't tested it with
CScript.

HTH,
Mythran
Jan 8 '07 #3

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

Similar topics

4
by: Michael Riggio | last post by:
Hello, Part of the installation process for our program requires regasm.exe to be run. However, I can't find any specific information that says it is freely distributable. I would image it is,...
1
by: awk | last post by:
I have a dll built with c# in VS.net and Register for COM interop is set to true. This builds fine on my xp development machine and the dll output is used by a User defined function in sql...
2
by: Andy Bates | last post by:
Hi - I have a C# .NET assembly that exposes a COM interface (basically has an interface and class with Guid attributes). If I compile this under VS.NET (with the "Register for COM Interop"...
2
by: Raed Sawalha | last post by:
is it possible to automate GAC and REGASM process byt code? i need to do the following procedure using code ,is it possbile? 1. gacutil - i assemblyname 2. regasm assmebname /tlb:name/codebase
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, TlbExp.exe and Regasm.exe tools aid us in exporting assembly information to a type library so that non .Net Applications or unmanaged code use this type library information to call...
1
by: Vikram | last post by:
i am registering crypto assebmbly using regasm for using it in my vb app, but when i refer class and invode its method it gives me some of the dependecies not found error. any suggestions
2
by: Kenneth Jonsson | last post by:
I have an COM server in an assembly. When it is deployed on a target computer it needs to be registred with RegAsm. I created a custom action in the deploy project, starting RegAsm with the...
1
by: auad | last post by:
hi, I would like to register a dll (regasm) during the execution of my setup using custom actions. I don't know where to place the parameters for regasm in the custom action. I tried using "...
4
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am debugging and learning MSDN C# COM server sample. http://msdn2.microsoft.com/en-us/library/aa645738(vs.71).aspx I am using Regasm to generate Windows Registry scripts,...
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.