Webmaster Forum

Go Back   Webmaster Forum > Scripting/Programming & Debugging > ASP & VBScript Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2008, 05:21 PM
DarthPoker DarthPoker is offline
Junior Member
 
Join Date: Feb 2008
Posts: 1
DarthPoker is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default Getting NTUser.dat file from certain winnt profiles

Hi,

I'm trying to use WMI to grab a collection of winnt user profile folders, then check the folder names to see if they have certain phrase in them and if so then grab the ntuser.dat file in that folder.

I've got this far...

Set colFolderList = objWMI.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Documents and Settings'} Where " _
& "ResultClass = Win32_Directory")

For Each objFolder In colFolderList
If InStr(objFolder.FileName, "admin") Then

Then I lose it...

Set colDATFile = objWMI.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Documents and Settings\' & objFolder.FileName} Where " _
& "FileName = NTUser.dat")

I know that's wrong but I can't work outthe syntax.

Please can you help.

Thanks
Reply With Quote

This ad is part of our Revenue Sharing program
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append text file frikkied ASP & VBScript Forum 3 10-31-2007 09:04 PM
Example of Inserting and Retrieving data from xml file hanusoft Web Developers & Development Software 0 10-01-2007 06:26 AM
text file to excel heavydee ASP & VBScript Forum 3 09-21-2007 05:55 PM


All times are GMT. The time now is 05:33 AM.


Creative Commons License
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30