| |

VerySource

 Forgot password?
 Register
Search
View: 6|Reply: 0

★★ ☆ First aid! !! !! About Win32_Directory or Win32_ShortcutFile of WMI ☆ ★★

[Copy link]

1

Threads

1

Posts

2

Credits

Newbie

Rank: 1

Credits
2

 China

Post time: 2020-1-2 18:00:02
| Show all posts |Read mode
SelectQuery query = new SelectQuery ("select * from Win32_Directory WHERE Drive = 'F:'");
ManagementObjectSearcher searcher = new ManagementObjectSearcher (query);

foreach (ManagementBaseObject disk in searcher.Get ())
{
tn.Text = disk ["VolumeName"]. ToString () + "(" + disk ["Name"]. ToString () + ")";

}

Now use WMI's Win32_Directory to query all files under the F drive. But now I don't want to query all the paths I want to specify
select * from Win32_Directory WHERE Drive = 'F:' and Path = '\\Documents and Settings\\' so that nothing can be queried. . Expert advice! !! !!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list