Solved

How to write a batch to register DLLs

Posted on 2007-04-04
1
451 Views
Last Modified: 2010-03-05
I need to write the following logic into batch file that would be run when user logs on
If PathExists("C:\MyApplication") then
  net use I: "Data_SERV\Data"
  regsvr32 -s "I:\MIS\Source Codes\DLL\clsLend.dll"
  regsvr32 -s "I:\MIS\Source Codes\DLL\clsLendSrv.dll"
end if

The inside of if statement is already correct just the folder exists check and if statement syntax I dont know.

0
Comment
Question by:psokolo
1 Comment
 
LVL 30

Accepted Solution

by:
SteveGTR earned 500 total points
ID: 18853472
Try this:

@echo off

setlocal

if exist "C:\MyApplication" (
  net use I: "Data_SERV\Data"
  regsvr32 -s "I:\MIS\Source Codes\DLL\clsLend.dll"
  regsvr32 -s "I:\MIS\Source Codes\DLL\clsLendSrv.dll"
)

For more information on the if command and other commands, enter if /? at the command prompt.

Good Luck,
Steve
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now