PC Review


Reply
Thread Tools Rate Thread

- How to auto-release file locks on NT/WIN2K server?

 
 
Dave Patrick
Guest
Posts: n/a
 
      28th Sep 2004
From a command prompt;
net pause server
net sess /d /y
'will disconnect all users
'run your backup
net continue server


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"S>B>S" wrote:
| To facilitate scheduled updates, I wrote a small batch file that simply
| replaces certain application files on the server (NT4/WIN2K). Everything
| works fine and the files get updated as long as no one has them opened
| (these are network shared files and anyone in the company could be using
| them).
|
| Is there a way to make sure that the files that need to be replaced are
| released by the operating system (no mater who is using them, just release
| the locks) for the update to go through? In particular, I need something
| that I could use to auto-release locks on specific files (some sort of
batch
| script). Any idea how this should look like?
|
|


 
Reply With Quote
 
 
 
 
S>B>S
Guest
Posts: n/a
 
      28th Sep 2004
To facilitate scheduled updates, I wrote a small batch file that simply
replaces certain application files on the server (NT4/WIN2K). Everything
works fine and the files get updated as long as no one has them opened
(these are network shared files and anyone in the company could be using
them).

Is there a way to make sure that the files that need to be replaced are
released by the operating system (no mater who is using them, just release
the locks) for the update to go through? In particular, I need something
that I could use to auto-release locks on specific files (some sort of batch
script). Any idea how this should look like?


 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a
 
      28th Sep 2004
This may help.

http://www.sysinternals.com/ntw2k/freeware/psfile.shtml

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"S>B>S" wrote:
| Disconnecting all the users and pausing the server is not an option since
it
| supports 24/7-type operations. What I really need is to release locks on
| specific files only, is that possible?
|
| For instance:
| :::::::::::::::::::::::::::::::::::::
| set srcdir= "\\server\UPDATES\"
| set destdir="\\server\APPFILES\"
| for each file in srcdir
| do(
| If file with the same name exists in destdir(
| release all locks
| )
| copy
| )


 
Reply With Quote
 
S>B>S
Guest
Posts: n/a
 
      28th Sep 2004
Disconnecting all the users and pausing the server is not an option since it
supports 24/7-type operations. What I really need is to release locks on
specific files only, is that possible?

For instance:
:::::::::::::::::::::::::::::::::::::
set srcdir= "\\server\UPDATES\"
set destdir="\\server\APPFILES\"
for each file in srcdir
do(
If file with the same name exists in destdir(
release all locks
)
copy
)
:::::::::::::::::::::::::::::::::::::

"Dave Patrick" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> From a command prompt;
> net pause server
> net sess /d /y
> 'will disconnect all users
> 'run your backup
> net continue server
>
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "S>B>S" wrote:
> | To facilitate scheduled updates, I wrote a small batch file that simply
> | replaces certain application files on the server (NT4/WIN2K). Everything
> | works fine and the files get updated as long as no one has them opened
> | (these are network shared files and anyone in the company could be using
> | them).
> |
> | Is there a way to make sure that the files that need to be replaced are
> | released by the operating system (no mater who is using them, just

release
> | the locks) for the update to go through? In particular, I need something
> | that I could use to auto-release locks on specific files (some sort of
> batch
> | script). Any idea how this should look like?
> |
> |
>
>



 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a
 
      29th Sep 2004
Glad to hear it. You're welcome.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"S>B>S" wrote:
| This works just fine. Thanks!


 
Reply With Quote
 
S>B>S
Guest
Posts: n/a
 
      29th Sep 2004
This works just fine. Thanks!

"Dave Patrick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This may help.
>
> http://www.sysinternals.com/ntw2k/freeware/psfile.shtml
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "S>B>S" wrote:
> | Disconnecting all the users and pausing the server is not an option

since
> it
> | supports 24/7-type operations. What I really need is to release locks on
> | specific files only, is that possible?
> |
> | For instance:
> | :::::::::::::::::::::::::::::::::::::
> | set srcdir= "\\server\UPDATES\"
> | set destdir="\\server\APPFILES\"
> | for each file in srcdir
> | do(
> | If file with the same name exists in destdir(
> | release all locks
> | )
> | copy
> | )
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locks Cylinders Deadbolt Schlage, Medeco Mul-T-Locks, Baldwin Locks,Kwikset Locks, Mortise Locks, Dexter Locks lifeine Microsoft C# .NET 0 13th Oct 2009 06:46 PM
Cursor locks on cells and won't release as if in auto fill mode? =?Utf-8?B?QmVybXVkYSBSb2Nrcw==?= Microsoft Excel Crashes 2 21st Nov 2006 08:32 PM
ASP.NET process locks XML file, how to release/close it? Edward Microsoft C# .NET 0 13th Jan 2004 02:54 AM
DHCP Server Value won't release on Win2K PC Microsoft Windows 2000 2 5th Jan 2004 04:33 PM
DHCP Server Value won't release on Win2K PC Microsoft Windows 2000 Networking 1 2nd Jan 2004 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:05 AM.