Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help me copy a new DLL in to the system32 directory

0 views
Skip to first unread message

Aric B. Lambert

unread,
Oct 25, 1998, 2:00:00 AM10/25/98
to

How can I copy a dll file to the system32 directory if the file is being
used by Windows?
--
Aric B. Lambert
NSF Engineering Research Center
Mississippi State University
P O Box 9627
Mississippi, MS 39762

Stephen Kwasniak

unread,
Oct 25, 1998, 2:00:00 AM10/25/98
to
maybe if the fs is FAT you can boot to dos and the copy it?
just a quick thought
--
Stephen

Aric B. Lambert <a...@erc.msstate.edu> wrote in article
<710184$b6m$1...@nntp.msstate.edu>...

Mark Friedlander

unread,
Oct 25, 1998, 2:00:00 AM10/25/98
to
If it's not a FAT partition, you may be able to pause the service or
application that is using the DLL. What dll is it and why do you want to
copy it?


Roger J.Hamlett

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
In article: <710184$b6m$1...@nntp.msstate.edu> "Aric B. Lambert"
<a...@erc.msstate.edu> writes:
>
>
> How can I copy a dll file to the system32 directory if the file is
being
> used by Windows?
The normal 'proceedure' is:-
rename the.dll the.old
copy new.dll the.dll
reboot system

Best Wishes

--
--------------------------------------------------------------------
| EMail ro...@ttelmah.demon.co.uk http://www.ttelmah.demon.co.uk/ |
| A beard! A beard! cried Fly Nicholas.'By God, that's a good one!'|
| (Chaucer) |

Frode Gill

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
In article <390103...@ttelmah.demon.co.uk>, Ro...@ttelmah.demon.co.uk wrote:
>> How can I copy a dll file to the system32 directory if the file is
>> being used by Windows?
>
>The normal 'proceedure' is:-
>rename the.dll the.old
^^^^^^

And this is not possible when the .dll is in use by windows...

Another way of doing it, is to put the new <file>.dll in the directory
as <file>.tmp, and have it renamed to .dll during startup. There is a
way to set this in the registry - not sure how to do it though :-/


Frode G.

Roger J.Hamlett

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
In article: <36344...@195.1.61.6> frode...@agresso.no (Frode
Since when?. You can rename a DLL in use, you just cannot move it.
This is the proceedure used by most standard 'updates' (including
those from MS). You _must_ have administrator priviledges. The code
'using' the DLL will carry on happily using the 'renamed' one, until
you re-boot.

Henning Halfpap

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
A few days ago, I already commented on the same problem. Unfortunately I
cannot retrieve the particular message (our news admins are kinda
restrictive on expiry) so I'll write it down again.

The trick's rather nasty and I would suggest you really take all
security measures. The command shell of NT seems to happily ignore file
locks. so, you can use the 'copy' command to replace the dll in question
with your machine running. Afterwards' I'd suggest a reboot. As I said,
this trick is nasty and might result in damage so handle with care!

Henning

--
"I have no idea what's going on here, but it's quite entertaining..."
-- Jason Willoughby on r.h.o.d

E-Mail will be posted as I see fit.

pinc...@my-dejanews.com

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
In article <710184$b6m$1...@nntp.msstate.edu>,

"Aric B. Lambert" <a...@erc.msstate.edu> wrote:
>
> How can I copy a dll file to the system32 directory if the file is being
> used by Windows?
> --

If you can't locate the program that is using the file then you do this.

Rename the old file.
Copy the new file.
Reboot.

Otherwise just close the program that's using the file.

cheers.


> Aric B. Lambert
> NSF Engineering Research Center
> Mississippi State University
> P O Box 9627
> Mississippi, MS 39762
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Mark Friedlander

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
In the email I received regarding your problem, you indicated the dll was
"comct32.dll". I think that you may mean comctl32.dll. If so, comctl32.dll
can be updated by applying Service Pack 3. Likewise, if you created an
uninstall folder, you can restore the old version by uninstalling SP3. You
should keep in mind that it is likely that other applications may also need
this dll and that changing the version may present difficulties with other
applications. If possible, obtain an updated copy of the application and
run the newest dlls.


MagNaMan

unread,
Oct 26, 1998, 3:00:00 AM10/26/98
to
If you can use Visual Basic, you can use the following:

******* Put this in a module *******
Option Explicit

Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA" (ByVal
lpExistingFileName As String, ByVal lpNewFileName As String, ByVal dwFlags
As Long) As Long

Public Const MOVEFILE_DELAY_UNTIL_REBOOT = &H4

Public Const MOVEFILE_REPLACE_EXISTING = &H1

******* Create a function that creates a move-on-reboot *******

MoveFileEx "currentfilename", "newfilename", MOVEFILE_DELAY_UNTIL_REBOOT +
MOVEFILE_REPLACE_EXISTING


----------------

I used this function in an install program I wrote with VB for NT. This
will not work for Windows 95/98! You have to use the wininit.ini for
windows 95, but it works similarly.


Aric B. Lambert wrote in message <710184$b6m$1...@nntp.msstate.edu>...


>
>How can I copy a dll file to the system32 directory if the file is being
>used by Windows?
>--

William G. Simeon

unread,
Oct 27, 1998, 3:00:00 AM10/27/98
to
You can also use the following method (from the NTFAQ web site)


You can also replace inuse files by editing:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager and ammend
or Add Value name
PendingFileRenameOperations, a type REG_MULTI_SZ value. Each rename uses two
lines

Line 1 contains: \??\<Drive:>\<SourcePath>\SourceFileName.Extension\0

Line 2 contains:
\??\<Drive:>\<DestinationPath>\DestinationFileName.Extension\0

If you had additional files, they would be line 3 and 4, 5 and 6, etc....

At the next boot, the <Drive:>\<SourcePath>\SourceFileName.Extension
is moved to the <Drive:>\<DestinationPath>\DestinationFileName.Extension
and the PendingFileRenameOperations value name is deleted.

Required Disclaimer:
The opinions expressed herein are my own and are NOT those of my employer.
--
When I die, I want to go peacefully,
In my sleep, like my grandfather.
Not screaming,
like the passagners in his car!
wsi...@netscape.net

0 new messages