Page 1 of 1 1
Topic Options
#68403 - 2002-07-16 05:58 PM copying a file wich is in use
Anonymous
Unregistered


hi

i have a prob. I need to overwrite a file at startup but it's already in use (it's used by f-secure anti vir prog wich means it may be used from a service ) Is there a way to deal with this i.e. copy the file before the service starts ?

thanks

Top
#68404 - 2002-07-16 06:28 PM Re: copying a file wich is in use
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
try

http://www.jsiinc.com/SUBA/tip0400/rh0470.htm
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#68405 - 2002-07-16 07:02 PM Re: copying a file wich is in use
Anonymous
Unregistered


ok but have primary a lot of win 9x machines login onto a NT domain....
Top
#68406 - 2002-07-16 07:08 PM Re: copying a file wich is in use
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
See this UDF: UpdateFileOnReboot()
_________________________
There are two types of vessels, submarines and targets.

Top
#68407 - 2002-07-17 11:47 AM Re: copying a file wich is in use
Anonymous
Unregistered


thanks a lot for this help but it's a rather heavy way for simply updating a file ... and there are a lot of functions to put tgether..

isn't there something more convenient for this task ?

Top
#68408 - 2002-07-17 03:52 PM Re: copying a file wich is in use
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
If the file is in use, then you must update it upon reboot. That requires you to edit the registry. It will alos require you to force the computer to actually reboot after the registry changes. This is the same way Microsoft and installer programs do it, too.

The UDF I provided to you does it automatically, so I think it is less work than writing the routine yourself.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 255 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.052 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org