首页 » 默认不分类 » 利用wmi删除特殊文件夹

利用wmi删除特殊文件夹

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
 
Set colFolders = objWMIService. _
    ExecQuery("Select * from Win32_Directory Where Name = 'C:\\Ken\'s Scripts'")
 
For Each objFolder in colFolders
    errResults = objFolder.Delete
Next

, , , , ,

转发到新浪微博 转发到新浪微博

目前这篇文章有43条评论(Rss)

  1. Dance Lessons | #1
    05/17/2012 at 09:17

    You…are…my…hero!!! I cant believe something like this exists on the internet! Its so true, so honest, and more than that you dont sound like an idiot! Finally, someone who knows how to talk about a subject without sounding like a kid who didnt get that bike he wanted for Christmas.

  2. Smith | #2
    05/17/2012 at 09:25

    What you said made a lot of sense. But, think about this, what if you added a little content? I mean, I dont want to tell you how to run your blog, but what if you added something to maybe get peoples attention? Just like a video or a picture or two to get people excited about what youve got to say. In my opinion, it would make your blog come to life a little bit.

  3. cctv installers coventry | #3
    05/17/2012 at 09:41

    This is a good posting, I was wondering if I could use this write-up on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away

我要评论