Solved

Regsvr32 returns "bad command or filename"

Posted on 2002-05-03
19
824 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
 
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
Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

 
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

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Suggested Solutions

Update 11/3/2014 - Although the below article will get you to relocate the WINSXS folder, Microsoft has finally released a utility to reduce the size of the WINSXS folder. For some reason, it's not that straightforward. It only works on Windows 2008…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

758 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

20 Experts available now in Live!

Get 1:1 Help Now