?
Solved

overwrite system dll's

Posted on 2001-07-10
5
Medium Priority
?
476 Views
Last Modified: 2013-12-03
Hi.
I'm installing a software and I need to update some dll's in the system folder.
some of these dll's are always locked by the system, and the installer (which is a tcl script) fails on the copy.

How do I do this, how to overwrite the dll's?
0
Comment
Question by:romanm
[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 Comments
 
LVL 8

Accepted Solution

by:
mxjijo earned 900 total points
ID: 6270409

There are 2 scenarios. I hope you can do Win32 stuff from TCL

1) You need to replace the DLL's in use.
2) You need to replace the System DLL's.

In the first case, use MoveFileEx() with MOVEFILE_DELAY_UNTIL_REBOOT flag. On reboot the system will replace the Old file with the new file.

The second case is a little more complicated. Windows protects all its system files with WFP (Windows File Protection) - Its sux!! When you try replace/modify any of these protected files, Windows will simply replace it with the Original installed copy from its cache. But, the good news is, there is an undocumented Reg entry that the experts found out, which can disable WFP. I forgot that regKey, You need to look up in the newsgroups for MoveFileEx()

0
 
LVL 20

Expert Comment

by:Madshi
ID: 6270580
mxjijo is right. However, MoveFileEx with DelayUntilReboot works only in winNT. In win9x you have to edit the file "C:\Windows\WinInit.ini" to replace files that are in use during the next reboot. The WFP problem in winME remains the same...

Regards, Madshi.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6271248
MS has two KB articles that describe this issue in detail:

http://support.microsoft.com/support/kb/articles/Q140/5/70.ASP ('HOWTO: Move Files That Are Currently in Use' - W2k/NT and Win9x)

An additional methid for Win9x is described in http://support.microsoft.com/support/kb/articles/Q172/4/56.ASP ('How to Automatically Replace Files In Use by Windows 95')

An additional method for W2k/NT can be found at http://support.microsoft.com/support/kb/articles/Q181/3/45.ASP ('How to Replace Files In Use at Windows NT Restart')
0
 
LVL 4

Expert Comment

by:jimstar
ID: 6271794
Every dll/ttf/exe/vxd that is shipped with Windows 98SE/2000/ME/XP is protected with either SFP, SFC, or WFP.

Getting around SFP in Windows 98SE isn't too hard. Getting around WFP in Windows 2000 (with no service packs installed) isn't too hard either with a little dissassembly of core system files.  After SP1 is installed there really isn't any easy way to disable WFP. And Windows XP is looking darn near impossible to disable.

Unless you get a digital signature on your CAB file from Microsoft by testing it in their laboratories, you're going to have to disable the WFP.

Is this the type of system file you are talking about? Or are you referring to simply an in-use file?

*note: SFC=SystemFileChecker, WFP=WindowsFileProtection, SFP=SystemFileProtection
0
 
LVL 3

Author Comment

by:romanm
ID: 6276955
I've used the MoveFileEx solution.
I still prefer to do it using the registery but a deadline is a deadline.
tnx mxjijo
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

764 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