473,384 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,384 software developers and data experts.


Hi, i am trying to find the user who locks the file (ms excel or word file )
in a shared folder. I have written the code but
wmiObject.GetRelated("Win32_Process") returns no process.

How can i find the user?

Thanks for your assistance

Dim mySelect As New SelectQuery("select * from cim_datafile Where name='" &
fileName & "'")
Dim myResults As New ManagementObjectSearcher(mySelect)
For Each wmiObject As ManagementObject In myResults.Get()
For Each myProcess As ManagementBaseObject In

Jul 21 '05 #1
1 2240

I have seen this question a lot of times before and never saw an answer.
However you say about an office file.

Maybe you can try it crossposted in one of these newsgroups.


I thougth that I had readed that Office had an extra mechanism.

I hope this helps?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Brian Piscopo | last post by:
Memory leak and .NET -- like oil and water :- I've written a distributed system for parallel processing of large tasks. Each machine has an agent on it that sends processor usage information back...
by: David Clegg | last post by:
I initially posted this to .Framework.WMI a week ago but am yet to have a response... I am having trouble changing properties of a Windows Service application using the ManagementObject class...
by: scsharma | last post by:
hi, I am trying following code. string fileObject = @"C:\Documents and Settings\myfolder\Temp.txt"; ManagementBaseObject ret = null; ManagementPath path = new ManagementPath( ); path.Server =...
by: Scupper | last post by:
I am using the System.Management namespace for the first time and I cannot get the ManagementObject.SetPropertyValue method to work properly. I am trying to change the ServerName and ShareName...
by: S.D | last post by:
Hi, i am trying to find the user who locks the file (ms excel or word file ) in a shared folder. I have written the code but wmiObject.GetRelated("Win32_Process") returns no process. How can i...
by: Joao Rego | last post by:
Hello, Im using WMI to get CPU information through Win32_Processor. It returns a collection but some items are "not valid". ..... foreach( ManagementObject oReturn in oReturnCollection ) {...
by: wasishincar | last post by:
Hi All, I am working on deleting disconnected devices in Device Manager. I write codes as below but get exception that tells something like "Provider Cannot do attempted operation" ErrorCode is...
by: DBC User | last post by:
Hi all, I am in a situation where I need to find the a unc path of a particular drive or I have a unc path, I need to find the drive. Either way will work. I do not want to use dllimport to make...
by: thiagoalencar22 | last post by:
Hello, Where can I find informations on which WMI queries are in fact available for .NET interface through ManagementObjectSearcher. The command below returns exception for "Win32_LogicalDisk",...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.