Solved

overwrite system dll's

Posted on 2001-07-10
5
462 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
5 Comments
 
LVL 8

Accepted Solution

by:
mxjijo earned 300 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

13 Experts available now in Live!

Get 1:1 Help Now