Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch file help needed

Status
Not open for further replies.

mickymoo

Programmer
Apr 4, 2002
23
GB
Confused

When I run this batch file on w2000 it works perfectly.

When I run it on w98 I get the error Bad name or command and it hangs. Any ideas why?



rem this batch file copies all the necessary dll's and ocx files to make crystal viewer work properly on a computer


if exist %systemroot%\system32 copy u:\needed\*.dll %SystemRoot%\system32
if exist %systemroot%\system32 copy u:\needed\*.ocx %SystemRoot%\system32


regsvr32 %systemroot%\system32\craxdrt.dll /s
regsvr32 %systemroot%\system32\crviewer.dll /s
regsvr32 %systemroot%\system32\ExportModeller.dll /s
regsvr32 %systemroot%\system32\crtslv.dll /s
regsvr32 %systemroot%\system32\comdlg32.ocx /s



thanks

Michael
 
As a guess I can only think that System32 only exists in W2000 and is System in W98
 
I could be wrong on this one, but I think for Windows 98, the variable %systemroot% is not available. Try %windir%. It works for me in my batch file for win9x. You'll need to detect the os and then go to the appropriate spot in your batch file. ---------------------------------------

In my limited experience, 80-90% of all problems brought to my attention can be attributed to PEBCAK...the other 10-20% can be attributed to MS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top