Solved

need to exchange a dll but windows doesn't allow it

Posted on 2000-05-12
9
190 Views
Last Modified: 2013-12-28
i need to exchange a dll (msvcrt.dll).
windows nt allows not to rename or delete it, it's in use.

how can i do this?

the pc only runs nt with ntfs, so booting with a dos diskette ... is not possible.
0
Comment
Question by:hreinart
  • 3
  • 3
  • 3
9 Comments
 
LVL 3

Expert Comment

by:simonprr
ID: 2804074
Open a DOS Prompt Window (Run cmd.exe)

cd \winnt\system32 <enter>
ren msvcrt.dll msvcrt.old <enter>
ren newfile.dll msvcrt.dll <enter>

The newfile.dll is the file you want to overright the current one with.
0
 
LVL 3

Expert Comment

by:simonprr
ID: 2804078
BTW, The command ren is short for the command rename (both work).
0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 2804429
Sorry, renaming won't work as the file is still in use.

The MS mechanism for replacing files that are in use is described here:

http://support.microsoft.com/support/kb/articles/Q140/5/70.asp ("HOWTO: Move Files That Are Currently in Use")

Be sure to also check out

http://msdn.microsoft.com/library/psdk/buildapp/setup_66es.htm

0
Technology Partners: 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!

 
LVL 3

Expert Comment

by:simonprr
ID: 2804632
It works in this case. You try it.

In Windows Explorer it won't work, but in the NT DOS Prompt is DOES. Just try it and you'll see what I mean.
0
 

Author Comment

by:hreinart
ID: 2805179
comment for jkr:
thanks for this info.
it looks like that i forgot to mention that i want to do this manually. i have no programm which does this for me,
where i could use the information provided by you.

any other idea?
0
 

Author Comment

by:hreinart
ID: 2805185
comment for simonprr:
i'll try this out, but fear it'll not work.
...but i hope you're right.
0
 
LVL 86

Expert Comment

by:jkr
ID: 2805283
>>i forgot to mention that i want to do
>>this manually

Sorry, being a programmer I often forget about this ;-)


You can do the same by placing an entry like

c:\winnt\system32\msvcrt.dll=c:\replacement\msvcrt.dll

in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\FileRenameOperations

(That's what this API actually does)
0
 

Author Comment

by:hreinart
ID: 2805973
thanks, i'll try it and let you know.
what languages do you programm?
(my mail=deuli@addcom.de)
0
 
LVL 86

Expert Comment

by:jkr
ID: 2808743
Naja, hauptsaechlich C/C++, wie aus meinem EE-Profile unschwer  zu entnehmen ist ;-)

Oh, yes, don't forget to reboot after placing the entry in the registry...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
An article on effective troubleshooting
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

680 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