Solved

Regsvr32 returns "bad command or filename"

Posted on 2002-05-03
19
861 Views
Last Modified: 2013-12-28
I have a user who has windows 98 machine.  I'm trying to have him manually register a dll.  from the c:\windows\system directory when he tries to register it with the regsvr32.exe it returns an error "bad command or filename".  Even when he just types regsvr32 and presses enter it gives "bad command or filename".  the file is there so that's not the problem.  just typing regsvr32 should bring up a messagebox displaying the parameters used for regsvr32.  I've even emailed him a regsvr32.exe to try and I've written a batch file to run the command regsvr32 myfile.dll.  

Any ideas?  Corrupt registry?  Does he need to install or reinstall dcom98?  He says he's not having any problems with his machine.
0
Comment
Question by:dsa7
[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
  • 5
  • 3
  • 3
  • +5
19 Comments
 
LVL 15

Expert Comment

by:hewittg
ID: 6988723
Have your win98 cd, go to start
run
type in sfc.  Scan for altered files.

Glenn
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 6988725
try going to the dos prompt and type in the following commands:

C:
cd C:\windows\system
regsrv32 myfile.dll
0
 
LVL 4

Expert Comment

by:gencross
ID: 6988934
For some reason perhaps the regsvr32.exe file is not in the path.  

at a Dos prompt type: Path[enter].  The windows\system directory should be there.  If it is not goto the autoexec.bat file and add it to the path= line.  If it is double check that the regsvr32.exe file is in the windows\system.  You may also want to test running another EXE file from the same directory as the regsvr32 to see if it runs in the path or gives a error also.  This way you can track down where the problem is.  There may also be something else that is going on that you do not know about since it sounds like you are not in front of the computer yourself.

Hope this helps
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 3

Expert Comment

by:pleasenospam
ID: 6988969
"manually register a dll"

Perhaps somebody could go into a little detail about the PURPOSE of the registration.
For instance, does this put an entry in the REGISTRY?  If so, what does that do?
0
 

Expert Comment

by:danbishop
ID: 6988998
Sounds like the file is missing.

Refer to this for explanations, etc.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q249873


Download the file here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q267279


-Dan
0
 
LVL 10

Expert Comment

by:emery800
ID: 6989720
pleasenospam: Some dll's need to be registered for programs to run properly and once in awhile you get a stubborn one that didn't register and you can do this manually by running the regsvr32.
  dsa7: Did you have them do a search and make sure the file is in the windows\system folder? Dave
0
 

Author Comment

by:dsa7
ID: 6991639
had the user go to the dos prompt.
had him switch to the c:\windows\system directory.
typed dir regsvr32.exe. file was found
had the user type just regsvr32 and press enter
received "bad command or filename"
at the very least the it should have brought up the messagebox listing the parameters for regsvr32

0
 
LVL 10

Expert Comment

by:emery800
ID: 6992467
I guess it should have worked that way, I usually just run it from the start/run command in windows and you don't have to type the path. Dave
0
 
LVL 15

Expert Comment

by:hewittg
ID: 6992473
Have you tried to restore it as stated above?

Glenn
0
 
LVL 3

Expert Comment

by:pleasenospam
ID: 6992485
Suppose it is ALREADY registered.  Will it fail to respond or otherwise do any harm
to register it again?
0
 
LVL 10

Expert Comment

by:emery800
ID: 6992494
Nope!
0
 
LVL 15

Expert Comment

by:hewittg
ID: 6992497
My point is, it is not even seen with the dir.


GLenn
0
 
LVL 10

Expert Comment

by:emery800
ID: 6992513
GLenn: I haven't ever run it from dos, have you? As I indicated you just run it from the start/run window and leave a space before the dll. They could be typing something in wrong from dos. :>) Dave
0
 

Author Comment

by:dsa7
ID: 6992544
i had the user read back to me what was in the dos window and had him and it was fine.  I also wrote a batch file that return "bad command of filename"
0
 
LVL 10

Expert Comment

by:emery800
ID: 6992560
Interesting! :>)
0
 

Accepted Solution

by:
danbishop earned 100 total points
ID: 6993775
Refer to my link above - first one. Last statement from MS states that it has a dependancy. Just because you see the file, doesn't mean it's going to run if it's dependant on something that's not there, like MSVRCT.DLL, which almost every Windows program uses. If your user happened to uninstall an application that removed that file (for instance) then regsvr32 will not work.

Then after you've read the first link, download the package from the second link.

Try this and tell me what happens.

-Dan
0
 

Author Comment

by:dsa7
ID: 6993787
Thanks Dan.  I will try that.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7134574
Hello all,
I am Computer101, a moderator from Experts-Exchange and also an expert within this topic area. This uestion has been open a long time.  What I am going to do is allow feedback from the questioner and xperts.  If it is not resolved, I will delete or accept an answer based on the info I have been given, Experts, feel free to offer input.  I will monitor these questions for a period of 5-7 days and come back and evaluate.  I will have another moderator (who is also an expert in this topic area) look at the question also to ensure we do the right thing for this question.

Thank you
Computer101
Community Support Moderator
0
 
LVL 3

Expert Comment

by:pleasenospam
ID: 7135481
Before closing this out maybe some kind soul could post the correct version number
and length for REGSVR32.EXE

On my system there appear to be 4 different versions ranging from 10 KB to 37 KB
and the latest version number is for the 10 KB file.

I wonder if this might have been the source of some weird death screens from time to time...
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

631 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