Question How can I write a Batch file for setting paths & registering a .NET DLL?

kennasoft

New member
Joined
May 16, 2008
Messages
1
Programming Experience
5-10
Hi everybody, I love what u guys are doing here, keep it up people!
Errr... I'm new to .NET development though i'm a veteran developer in Java and PHP. I recently wrote a VB.NET DLL for a friend who does VBA apps with MS ACCESS, and he needs to use it on multiple systems.

Those who have created interop DLLs know the hell u have to go through to register & set it up to work (all the GAC, SN and REGASM stuff). I don't want my friend to go through all this trouble each time he wants to run his app on a new System and refernce my DLL.

So, here comes my problem. I know a batch can file can solve this problem, but I've never written a batch file before. I need help from anyone who can write a batch file to set the path of the EXECs [gacutil.exe, regasm.exe], and then run the regasm.exe tool with the '/tld:' switch to create the .tld file & also run gacutil.exe to register it in the GAC. I want him to copy the .DLL, .BAT and .SNK files to Windows\System32 folder then just click the batch file to do all the registering.

Somebody please help!
 
*bump*

I already wrote a batch file to register the .NET library I need to include with my application.

However, I ran into a snag; if a computer already has a .NET framework installed, the batch file will run the 2.0 framework redistributable then fail with an error. I understand that there is a add-in with VS to use Click-Once deployment, but as this is a library and included with an application which all are already zipped in a third party installer program, I would like to know if it's feasible to use the batch file to check if framework 2.0 is present before calling the installer for the framework?
 
Back
Top