473,546 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5963

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******** *************@1 1g2000cwr.googl egroups.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
5845
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, but I need something from microsoft that says it is. Does anyone know of any files in the sdk or perhaps a URL that lists the files that can be...
1
2381
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 server. This all works fine until I put the dll on a production server (small business server) then register it (without error) using regasm.exe. I get...
2
13533
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" selected). Then I can import the TLB into C++ and use the component as a standard COM component, it creates and I can call it's methods. If however,...
2
3649
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
1729
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 .Net assembly. Just like tlbimp which works on the entire COM Component (check out yesterdays article) tlbexp also works on the entire assembly. ...
1
1548
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
2885
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 assembly DLL as command argument. It all works as expected. To make RegAsm available I installed it from the framework bin directory to the componentes...
1
4460
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 " \myAssembly.dll " but regasm.exe didn't run during the execution of the setup. regasm <myAssembly.dll/codebase
4
2348
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, here it is, I can understand that for C# COM Server, since it is managed code, it will
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7794
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5361
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.