Solved

Regsvr32 returns "bad command or filename"

Posted on 2002-05-03
19
833 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
  • 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
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remote control Windows CE 7 93
Problem to file 5 29
Picture size 4 35
how to count files? 4 30
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
An article on effective troubleshooting
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, 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). …

809 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