?
Solved

How to write a batch to register DLLs

Posted on 2007-04-04
1
Medium Priority
?
462 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 30

Accepted Solution

by:
SteveGTR earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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). …
Six Sigma Control Plans

719 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