Registry error

TheMSsForum.com: The Microsoft Software Forum

  • The MSS Forum ‹ VBscripts
    • Archive
      • Biz
      • MCSE
      • CRM
      • Drivers
      • Framework
      • ADO
      • ASP
      • Compact
      • Forms
      • Dotnet
      • C#
      • VB
      • FontpageGen
      • Excel
      • WorkSheet
      • Exchange
      • Setup
      • Fox
      • Fontpage
      • ASP
      • IIS
      • Entourage
      • Money
      • Messanger
      • PocketPC
      • Powerpoint
      • Project
      • Publisher
      • Excel
      • VB
      • Security
      • Portal
      • Services
      • SQLServerDev
      • SVCS
      • SQLServer
      • VB
      • VC
      • MFC
      • ExcelGen
    • Previous
      • 1
        • Help with parsing string Hi all, Hope someone can help me with this..I have a string that I'm capturing using the StdOut.ReadAll method, problem is the string contains two lines and I only need the value example below - 4,708 and 425.3 "not MB": Estimated number is: 4,708 Estimated size is is : 425.3MB I've used the code below to get the first value but it also returns the bottom part of the string. Do I need to use the Split function? Code: i = InStrRev(strLogOut, "is:") strValb = "Value = " & Mid(strLogOut, i + 3) WScript.Echo strValb Ouput: Value = 4,708 Estimated size is : 425.3MB Thanks in advance. -Sip Tag: Registry error Tag: 181853
      • 2
        • HTA Help Good evening, 1st off, I wasn't sure where to post HTA question, if this is complete the wrong forum could someone please redirect me to a more appropriate one. 2nd and the question - I was wondering if someone could show me a sample HTA which uses radio buttons to control what is displayed in another part of the HTA. I have created a simple HTA which is split into 4 sections - Header, Footer, right and left. In the Left section is a series of radio buttons. I would like to be able to control the Right section based on what the user selects in the Left section. For instance, if the use selects the 1st radio button I would like a teaxt box to appear so they can enter a value and a button to run a script... Could someone either give me a sample script to learn from or direct me to a webpage that can educate me on this subject. Thank you very much. Daniel Tag: Registry error Tag: 181848
      • 3
        • Check User Directories Script This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C5CDB0.E696D530 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have this script working as a .vbs script but was trying to make an = HTA and I've succeeded in doing so, but I am having trouble trying to = call a sub from a sub. It worked as an HTA but apparently it does not = work. The sub I am trying to call is "SearchSubFolders" and I just want = to search the subfolders for the following information. This script = does a lot for an administrator. It provides the administrator with = results as the User directories are associated with a user in the = domain. I am wanting it to search the user directories for the .exe or = other file types. Like I said I have it working as a VBScript but as an = HTA it just isn't working correctly. I am not an expert but I can = figure things out. Please help if you can, I've tried making a = function, and doing a call and neither seem to work. If you have any = other ideas I'd appreciate it. Thanks. <html> <head> <title>Check User Directories</title> <HTA:APPLICATION=20 ID=3D"CHKUSRDIR" APPLICATIONNAME=3D"CHKUSRDIR" SCROLL=3D"no" SINGLEINSTANCE=3D"no" BORDER=3D"Thin" BORDERSTYLE=3D"COMPLEX" MAXIMIZEBUTTON=3D"NO" ICON =3D "app.ico" > </head> <SCRIPT Language=3D"VBScript"> Sub RunScript 'Created by PO Larry Overman @ ESD San Pedro On Error Resume Next Minimize Dim DomainString, FolderString, FilenameString Dim numargs, QUOTE, Count Dim objFSO, OutputFile Dim NTuserDat, NTuserDatMod Dim PSTFile, PSTFileSize, PSTFileMod Dim SubFolderName, SubFolderPath Dim MB Dim DomainObj, oUser Dim UserDisabled, UserDisabledhtm Dim UProfile, UserName Dim Folder, UserLastLoginTime, UserLastLogin Dim GoodCount, BadCount dim jpgcount, jpgsize dim pptcount, pptsize dim mpgcount, mpgsize dim mpegcount, mpegsize dim mp3count, mp3size=20 dim wmvcount, wmvsize dim wavcount, wavsize dim execount, exesize =20 set args =3D WScript.Arguments Set objFSO =3D CreateObject("Scripting.FileSystemObject") set msg =3D Createobject("MSG.WSC") QUOTE =3D CHR(34) Count=3D0 BadCount=3D0 GoodCount=3D0 msg.title =3D SharePath.value DomainString =3D Domain.Value if DomainString =3D "" then DataArea.InnerHTML =3D "No Domain Specified" Exit Sub end if =20 FolderString =3D SharePath.Value if FolderString =3D "" then DataArea.InnerHTML =3D "No Folder Specified" Exit Sub else If objFSO.FolderExists(FolderString) Then Set objFolder =3D objFSO.GetFolder(FolderString) Else DataArea.InnerHTML =3D FolderString & " - Path Not Found" Exit Sub End If End If FilenameString =3D OutputCSV.Value if FilenameString =3D "" then FilenameString =3D "OUTPUT.CSV" end if =20 Set OutputFile =3D objFSO.CreateTextFile(FilenameString, True) =20 Set DomainObj =3D GetObject("WinNT://" & DomainString) Set objUserList =3D CreateObject("Scripting.Dictionary") DomainObj.Filter =3D Array("User") msg.show msg.color =3D "white" msg.background =3D "black" msg.font =3D "System" msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Generating User List...</font><p>") dim test test=3D0 For Each oUser in DomainObj If Test > 30 Then Exit For End If=20 objUserList.Add UCase(OUser.Profile), UCase(oUser.Name) msg.writehtml("<font face=3D" & QUOTE & "System" & QUOTE & ">" & = oUser.Name & "</font>") test=3Dtest+1 Next msg.writehtml("<p><p><font color=3Dcyan face=3D" & QUOTE & "System" & = QUOTE & ">Done.</font>" & VbCrLf) =20 msg.clear =20 msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Domain: " & DomainString & "</font>") msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Folder: " & FolderString & "</font>") msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Filename: " & FilenameString & "</font>") msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Domain Users: " & objUserList.Count & "</font><p><p>") OutputFile.WriteLine("Domain: " & DomainString)=20 OutputFile.WriteLine("Folder: " & FolderString)=20 OutputFile.WriteLine("Filename: " & FilenameString) OutputFile.WriteLine("Domain Users: " & objUserList.Count & VBCrLf)=20 =20 colUsers =3D objUserList.Items OutputFile.WriteLine("Folder Name,Size (MB),User Name,Full = Name,Description,Last Login,Disabled,Profile Date,PST Size (MB),PST = Date,JPG's,JPG's Size (MB),PPT's,PPT's Size (MB),MPG's,MPG's Size = (MB),MPEG's,MPEG's Size (MB),MP3's,MP3's Size (MB),WMV's,WMV's Size = (MB),WAV's,WAV's Size (MB),EXE's,EXE's Size (MB)") Set colSubfolders =3D objFolder.Subfolders For Each Subfolder in colSubfolders msg.writehtml("") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & " = border><tr><td width=3D" & QUOTE & "50%" & QUOTE & " valign=3D" & QUOTE = & "top" & QUOTE & "><font size=3D" & QUOTE & "4" & QUOTE & " = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">Folder Name: = </font><font size=3D" & QUOTE & "4" & QUOTE & " face=3D" & QUOTE & = "System" & QUOTE & ">" & SubFolder.Name & "</font></td><td width=3D" & = QUOTE & "50%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = size=3D" & QUOTE & "4" & QUOTE & " color=3Dcyan face=3D" & QUOTE & = "System" & QUOTE & ">" & "SIZE: </font><font size=3D" & QUOTE & "4" & = QUOTE & " face=3D" & QUOTE & "System" & QUOTE & ">" & = MegaBytes(Subfolder.Size) & " MB</font></tb></tr></table>") if objFSO.FileExists(UCase(SubFolder.Path & = "\Profile\Profile.pds\NTUSER.DAT")) Then Set NTuserDat =3D objFSO.GetFile(UCase(SubFolder.Path & = "\Profile\Profile.pds\NTUSER.DAT")) NTuserDatMod =3D NTuserDat.DateLastModified else NTuserDatMod =3D "" End If If objFSO.FileExists(UCase(SubFolder.Path & = "\HOME\MAIL\MESSAGES.PST")) =3D True Then Set PSTFile =3D objFSO.GetFile(UCase(SubFolder.Path & = "\HOME\MAIL\MESSAGES.PST")) PSTFileSize =3D MegaBytes(PSTFile.Size) PSTFileMod =3D PSTFile.DateLastModified Else PSTFileSize =3D "0" PSTFileMod =3D "" End If =20 jpgcount=3D0 jpgsize=3D0 pptcount=3D0 pptsize=3D0 mpgcount=3D0 mpgsize=3D0 mpegcount=3D0 mpegsize=3D0 mp3count=3D0 mp3size=3D0 wmvcount=3D0 wmvsize=3D0 wavcount=3D0 wavsize=3D0 execount=3D0 exesize=3D0 Set objFolderS =3D objFSO.GetFolder(Subfolder.Path) Set colFilesS =3D objFolderS.Files For Each objFileS in colFilesS if LCase(Right(objFileS.Name, 4)) =3D ".jpg" then jpgcount=3Djpgcount+1 jpgsize=3Djpgsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".ppt" then pptcount=3Dpptcount+1 pptsize=3Dpptsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".mpg" then mpgcount=3Dmpgcount+1 mpgsize=3Dmpgsize+objFileS.Size end if if LCase(Right(objFileS.Name, 5)) =3D ".mpeg" then mpegcount=3Dmpegcount+1 mpegsize=3Dmpegsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".mp3" then mp3count=3Dmp3count+1 mp3size=3Dmp3size+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".wmv" then wmvcount=3Dwmvcount+1 wmvsize=3Dwmvsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".wav" then wavcount=3Dwavcount+1 wavsize=3Dwavsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".exe" then execount=3Dexecount+1 exesize=3Dexesize+objFileS.Size end if Next =20 SearchSubfolders(objFSO.GetFolder(Subfolder.Path)) If objUserList.Exists(UCase(SubFolder.Path & "\Profile\Profile.pds")) = Then Set oUserAccount =3D GetObject("WinNT://" & DomainString & "/" & = objUserLIst.Item(UCase(SubFolder.Path & "\Profile\Profile.pds")) & = ",user") If oUserAccount.AccountDisabled Then UserDisabledhtm =3D "<font color=3Dred face=3D" & QUOTE & "System" & = QUOTE & ">-YES-</font>" UserDisabled =3D "-Yes-" Else=20 UserDisabledhtm =3D "No" UserDisabled =3D "No" End If UserLastLoginTime =3D oUserAccount.LastLogin msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "50%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">USER ID: = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & = oUserAccount.Name & "</font></td><td width=3D" & QUOTE & "50%" & QUOTE & = " valign=3D" & QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & = QUOTE & "System" & QUOTE & ">Full Name: </font><font face=3D" & QUOTE & = "System" & QUOTE & ">" & oUserAccount.FullName & = "</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & = "><tr><td width=3D" & QUOTE & "100%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">DESCRIPTION: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" = & OUserAccount.Description & "</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "50%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">DISABLED: = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & UserDisabledhtm = & "</font></td><td width=3D" & QUOTE & "50%" & QUOTE & " valign=3D" & = QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">Last Login: </font><font face=3D" & QUOTE & "System" & QUOTE = & ">" & UserLastLoginTime & " MB</font></tb></tr></table>") OutputFile.WriteLine(SubFolder.Name & "," & MegaBytes(Subfolder.Size) = & "," & oUserAccount.Name & "," & oUserAccount.FullName & "," & = oUserAccount.Description & "," & UserLastLoginTime & "," & UserDisabled = & "," & NTuserDatMod & "," & PSTFileSize & "," & PSTFileMod & "," & = jpgcount & "," & MegaBytes(jpgsize) & "," & pptcount & "," & = MegaBytes(pptsize) & "," & mpgcount & "," & MegaBytes(mpgsize) & "," = & mpegcount & "," & MegaBytes(mpegsize) & "," & mp3count & "," & = MegaBytes(mp3size) & "," & wmvcount & "," & MegaBytes(wmvsize) & "," & = wavcount & "," & MegaBytes(wavsize) & "," & execount & "," & = MegaBytes(exesize)) GoodCount=3DGoodCount+1 else msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "100%" & QUOTE & " align=3D" & QUOTE & "Center" & = QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font size=3D" & QUOTE = & "6" & QUOTE & " color=3Dred face=3D" & QUOTE & "System" & QUOTE & = ">------ NO USER ID ATTACHED ------</font></td></tr></table>") OutputFile.WriteLine(SubFolder.Name & "," & MegaBytes(Subfolder.Size) = & ", , , , , ," & NTuserDatMod & "," & PSTFileSize & "," & PSTFileMod & = "," & jpgcount & "," & MegaBytes(jpgsize) & "," & pptcount & "," & = MegaBytes(pptsize) & "," & mpgcount & "," & MegaBytes(mpgsize) & "," = & mpegcount & "," & MegaBytes(mpegsize) & "," & mp3count & "," & = MegaBytes(mp3size) & "," & wmvcount & "," & MegaBytes(wmvsize) & "," & = wavcount & "," & MegaBytes(wavsize) & "," & execount & "," & = MegaBytes(exesize)) BadCount=3DBadCount+1 =20 End If Count=3DCount+1 msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & = "><tr><td width=3D" & QUOTE & "100%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">PROFILE DATE: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" = & NTuserDatMod & "</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">MESSAGES.PST: </font></font></td><td width=3D" & QUOTE & "25%" & QUOTE = & " valign=3D" & QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & = QUOTE & "System" & QUOTE & ">" & "SIZE: </font><font face=3D" & QUOTE & = "System" & QUOTE & ">" & PSTFileSize & " MB</font></tb><td width=3D" & = QUOTE & "50%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">LAST MODIFIED: = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & PSTFileMod & = "</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">JPG's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & jpgcount & = "</font></td><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & = QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">" & " Size: </font><font face=3D" & QUOTE & "System" & QUOTE = & ">" & MegaBytes(jpgsize) & " MB</font></tb><td width=3D" & QUOTE & = "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">PPT's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & pptcount & = "</tb><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">Size: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & = MegaBytes(pptsize) & " MB</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">MPG's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & mpgcount & = "</font></td><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & = QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">" & " Size: </font><font face=3D" & QUOTE & "System" & QUOTE = & ">" & MegaBytes(mpgsize) & " MB</font></tb><td width=3D" & QUOTE & = "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">MPEG's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & mpegcount & = "</tb><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">Size: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & = MegaBytes(mpegsize) & " MB</font></tb></tr></table>") msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">MP3's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & mp3count & = "</font></td><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & = QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">" & " Size: </font><font face=3D" & QUOTE & "System" & QUOTE = & ">" & MegaBytes(mp3size) & " MB</font></tb><td width=3D" & QUOTE & = "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">WMV's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & wmvcount & = "</tb><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">Size: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & = MegaBytes(wmvsize) & " MB</font></tb></tr></table>") =20 msg.writehtml("<table width=3D" & QUOTE & "100%" & QUOTE & "><tr><td = width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE = & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">WAV's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & wavcount & = "</font></td><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & = QUOTE & "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">" & " Size: </font><font face=3D" & QUOTE & "System" & QUOTE = & ">" & MegaBytes(wavsize) & " MB</font></tb><td width=3D" & QUOTE & = "25%" & QUOTE & " valign=3D" & QUOTE & "top" & QUOTE & "><font = color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & ">EXE's : = </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & execount & = "</tb><td width=3D" & QUOTE & "25%" & QUOTE & " valign=3D" & QUOTE & = "top" & QUOTE & "><font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE = & ">Size: </font><font face=3D" & QUOTE & "System" & QUOTE & ">" & = MegaBytes(exesize) & " MB</font></tb></tr></table><p>") Next msg.writehtml("") msg.writehtml(VbCrLf & "<font color=3Dcyan face=3D" & QUOTE & "System" = & QUOTE & ">Folders Listed: " & Count & "</font>") msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Folders Listed w/ Users Attached: " & GoodCount & "</font>") msg.writehtml("<font color=3Dcyan face=3D" & QUOTE & "System" & QUOTE & = ">Folders Listed w/o Users Attached: " & BadCount & "</font>") OutputFile.WriteLine(VbCrLf & "Folders Listed: " & Count) OutputFile.WriteLine("Folders Listed w/ Users Attached: " & GoodCount) OutputFile.WriteLine("Folders Listed w/o Users Attached: " & BadCount) OutputFile.Close msg.complete DataArea.InnerHTML =3D "Complete" window.close End Sub Sub SearchSubFolders(Folder) msg.write("it made it here to subfolders") For Each SubfolderS in Folder.SubFolders Set objFolderS =3D objFSO.GetFolder(SubfolderS.Path) Set colFilesS =3D objFolderS.Files For Each objFileS in colFilesS msg.write("it made it here to subfolders") if LCase(Right(objFileS.Name, 4)) =3D ".jpg" then jpgcount=3Djpgcount+1 jpgsize=3Djpgsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".ppt" then pptcount=3Dpptcount+1 pptsize=3Dpptsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".mpg" then mpgcount=3Dmpgcount+1 mpgsize=3Dmpgsize+objFileS.Size end if if LCase(Right(objFileS.Name, 5)) =3D ".mpeg" then mpegcount=3Dmpegcount+1 mpegsize=3Dmpegsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".mp3" then mp3count=3Dmp3count+1 mp3size=3Dmp3size+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".wmv" then wmvcount=3Dwmvcount+1 wmvsize=3Dwmvsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".wav" then wavcount=3Dwavcount+1 wavsize=3Dwavsize+objFileS.Size end if if LCase(Right(objFileS.Name, 4)) =3D ".exe" then execount=3Dexecount+1 exesize=3Dexesize+objFileS.Size end if Next SearchSubFolders(SubfolderS) Next End Sub Function MegaBytes(MB) MegaBytes =3D MB / 1048576 MegaBytes =3D Int(MegaBytes) End Function Function Minimize window.blur moveTo 2000,2000 End Function </SCRIPT> <body STYLE=3D"font:14 pt arial; color:white; filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=3D1, StartColorStr=3D'#000000', EndColorStr=3D'#0000FF')"> <table width=3D"100%"><tr><td width=3D"25%" valign=3D"top"><font = size=3D"3">Domain: </font></td><td width=3D"75%" valign=3D"top"><input = type=3D"text" name=3D"Domain" value=3D"ESUALAMEDA" = size=3D"100"></td></tr></table> <table width=3D"100%"><tr><td width=3D"25%" valign=3D"top"><font = size=3D"3">Share: </font></td><td width=3D"75%" valign=3D"top"><input = type=3D"text" name=3D"SharePath" value=3D"\\SANPEDROBDCF\USERSESD" = size=3D"100"></td></tr></table> <table width=3D"100%"><tr><td width=3D"25%" valign=3D"top"><font = size=3D"3">Output Filename: </font></td><td width=3D"75%" = valign=3D"top"><input type=3D"text" name=3D"OutputCSV" = value=3D"OUTPUT.CSV" size=3D"100"></td></tr></table> <p> <center><input type=3D"button" value=3D"Start" name=3D"run_button" = onClick=3D"RunScript"> <p> <span id =3D "DataArea"></span> <p> </body> </html> ------=_NextPart_000_0006_01C5CDB0.E696D530 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I have this script working as a .vbs = script but was=20 trying to make an HTA and I've succeeded in doing so, but I am having = trouble=20 trying to call a sub from a sub.&nbsp; It worked as an HTA but = apparently it=20 does not work.&nbsp; The sub I am trying to call is "SearchSubFolders" = and I=20 just want to search the subfolders for the following information.&nbsp; = This=20 script does a lot for an administrator.&nbsp; It provides the = administrator with=20 results as the User directories are associated with a user in the = domain.&nbsp;=20 I am wanting it to search the user directories for the .exe or other = file=20 types.&nbsp; Like I said I have it working as a VBScript but as an HTA = it just=20 isn't working correctly.&nbsp; I am not an expert but I can figure = things=20 out.&nbsp; Please help if you can, I've tried making a function, and = doing a=20 call and neither seem to work.&nbsp; If you have any other ideas I'd = appreciate=20 it.&nbsp; Thanks.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>&lt;html&gt;<BR>&lt;head&gt;<BR>&lt;title&gt;Check=20 User Directories&lt;/title&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&lt;HTA:APPLICATION=20 <BR>&nbsp;ID=3D"CHKUSRDIR"<BR>&nbsp;APPLICATIONNAME=3D"CHKUSRDIR"<BR>&nbs= p;SCROLL=3D"no"<BR>&nbsp;SINGLEINSTANCE=3D"no"<BR>&nbsp;BORDER=3D"Thin"<B= R>&nbsp;BORDERSTYLE=3D"COMPLEX"<BR>&nbsp;MAXIMIZEBUTTON=3D"NO"<BR>&nbsp;I= CON=20 =3D "app.ico"<BR>&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&lt;/head&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&lt;SCRIPT = Language=3D"VBScript"&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Sub RunScript</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;'Created by PO Larry Overman @ = ESD San=20 Pedro</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;On Error Resume Next</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;Minimize</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;Dim DomainString, FolderString,=20 FilenameString<BR>&nbsp;Dim numargs, QUOTE, Count<BR>&nbsp;Dim objFSO,=20 OutputFile<BR>&nbsp;Dim NTuserDat, NTuserDatMod<BR>&nbsp;Dim PSTFile,=20 PSTFileSize, PSTFileMod<BR>&nbsp;Dim SubFolderName, = SubFolderPath<BR>&nbsp;Dim=20 MB<BR>&nbsp;Dim DomainObj, oUser<BR>&nbsp;Dim UserDisabled,=20 UserDisabledhtm<BR>&nbsp;Dim UProfile, UserName<BR>&nbsp;Dim Folder,=20 UserLastLoginTime, UserLastLogin<BR>&nbsp;Dim GoodCount, = BadCount<BR>&nbsp;dim=20 jpgcount, jpgsize<BR>&nbsp;dim pptcount, pptsize<BR>&nbsp;dim mpgcount,=20 mpgsize<BR>&nbsp;dim mpegcount, mpegsize<BR>&nbsp;dim mp3count, mp3size=20 <BR>&nbsp;dim wmvcount, wmvsize<BR>&nbsp;dim wavcount, = wavsize<BR>&nbsp;dim=20 execount, exesize<BR>&nbsp;<BR>&nbsp;set args =3D = WScript.Arguments<BR>&nbsp;Set=20 objFSO =3D CreateObject("Scripting.FileSystemObject")<BR>&nbsp;set msg = =3D=20 Createobject("MSG.WSC")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;QUOTE =3D=20 CHR(34)<BR>&nbsp;Count=3D0<BR>&nbsp;BadCount=3D0<BR>&nbsp;GoodCount=3D0</= FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;msg.title =3D = SharePath.value</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;DomainString =3D = Domain.Value<BR>&nbsp;if=20 DomainString =3D "" then<BR>&nbsp;&nbsp;DataArea.InnerHTML =3D "No = Domain=20 Specified"<BR>&nbsp;&nbsp;Exit Sub<BR>&nbsp;end=20 if<BR>&nbsp;<BR>&nbsp;FolderString =3D SharePath.Value<BR>&nbsp;if = FolderString =3D=20 "" then<BR>&nbsp;&nbsp;DataArea.InnerHTML =3D "No Folder=20 Specified"<BR>&nbsp;&nbsp;Exit Sub<BR>&nbsp;else<BR>&nbsp;&nbsp;If=20 objFSO.FolderExists(FolderString) Then<BR>&nbsp;&nbsp;&nbsp;Set = objFolder =3D=20 objFSO.GetFolder(FolderString)<BR>&nbsp;&nbsp;Else<BR>&nbsp;&nbsp;&nbsp;D= ataArea.InnerHTML=20 =3D FolderString &amp; " - Path Not Found"<BR>&nbsp;&nbsp;&nbsp;Exit=20 Sub<BR>&nbsp;&nbsp;End If<BR>&nbsp;End If</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;FilenameString =3D = OutputCSV.Value<BR>&nbsp;if=20 FilenameString =3D "" then<BR>&nbsp;&nbsp;FilenameString =3D=20 "OUTPUT.CSV"<BR>&nbsp;end if<BR>&nbsp;<BR>&nbsp;Set OutputFile =3D=20 objFSO.CreateTextFile(FilenameString, True)<BR>&nbsp;<BR>&nbsp;Set = DomainObj =3D=20 GetObject("WinNT://" &amp; DomainString)<BR>&nbsp;Set objUserList =3D=20 CreateObject("Scripting.Dictionary")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;DomainObj.Filter =3D = Array("User")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;msg.show</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;msg.color =3D = "white"<BR>&nbsp;msg.background =3D=20 "black"<BR>&nbsp;msg.font =3D "System"</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;msg.writehtml("&lt;font = color=3Dcyan face=3D"=20 &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;Generating User=20 List...&lt;/font&gt;&lt;p&gt;")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;dim = test<BR>&nbsp;test=3D0</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;For Each oUser in = DomainObj<BR>&nbsp;&nbsp;If=20 Test &gt; 30 Then<BR>&nbsp;&nbsp;&nbsp;Exit For<BR>&nbsp;&nbsp;End If=20 <BR>&nbsp;&nbsp;objUserList.Add UCase(OUser.Profile),=20 UCase(oUser.Name)<BR>&nbsp;&nbsp;msg.writehtml("&lt;font face=3D" &amp; = QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; oUser.Name &amp;=20 "&lt;/font&gt;")<BR>&nbsp;&nbsp;test=3Dtest+1<BR>&nbsp;Next</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>&nbsp;msg.writehtml("&lt;p&gt;&lt;p&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp;=20 "&gt;Done.&lt;/font&gt;" &amp;=20 VbCrLf)<BR>&nbsp;<BR>&nbsp;msg.clear<BR>&nbsp;<BR>&nbsp;msg.writehtml("&l= t;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Domain: "=20 &amp; DomainString &amp; = "&lt;/font&gt;")<BR>&nbsp;msg.writehtml("&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Folder: "=20 &amp; FolderString &amp; = "&lt;/font&gt;")<BR>&nbsp;msg.writehtml("&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Filename: "=20 &amp; FilenameString &amp; = "&lt;/font&gt;")<BR>&nbsp;msg.writehtml("&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Domain=20 Users: " &amp; objUserList.Count &amp;=20 "&lt;/font&gt;&lt;p&gt;&lt;p&gt;")<BR>&nbsp;OutputFile.WriteLine("Domain:= "=20 &amp; DomainString) <BR>&nbsp;OutputFile.WriteLine("Folder: " &amp;=20 FolderString) <BR>&nbsp;OutputFile.WriteLine("Filename: " &amp;=20 FilenameString)<BR>&nbsp;OutputFile.WriteLine("Domain Users: " &amp;=20 objUserList.Count &amp; VBCrLf) <BR>&nbsp;<BR>&nbsp;colUsers =3D=20 objUserList.Items</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;OutputFile.WriteLine("Folder = Name,Size=20 (MB),User Name,Full Name,Description,Last Login,Disabled,Profile = Date,PST Size=20 (MB),PST Date,JPG's,JPG's Size (MB),PPT's,PPT's Size (MB),MPG's,MPG's = Size=20 (MB),MPEG's,MPEG's Size (MB),MP3's,MP3's Size (MB),WMV's,WMV's Size=20 (MB),WAV's,WAV's Size (MB),EXE's,EXE's Size (MB)")</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;Set colSubfolders =3D=20 objFolder.Subfolders</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;For Each Subfolder in=20 colSubfolders<BR>&nbsp;&nbsp;msg.writehtml("")<BR>&nbsp;&nbsp;msg.writeht= ml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; " = border&gt;&lt;tr&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "50%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font size=3D" &amp; QUOTE &amp; "4" = &amp; QUOTE=20 &amp; " color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp;=20 "&gt;Folder Name: &lt;/font&gt;&lt;font size=3D" &amp; QUOTE &amp; "4" = &amp; QUOTE=20 &amp; " face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;" = &amp;=20 SubFolder.Name &amp; "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; = QUOTE &amp;=20 "50%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE = &amp;=20 "&gt;&lt;font size=3D" &amp; QUOTE &amp; "4" &amp; QUOTE &amp; " = color=3Dcyan face=3D"=20 &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; "SIZE:=20 &lt;/font&gt;&lt;font size=3D" &amp; QUOTE &amp; "4" &amp; QUOTE &amp; " = face=3D"=20 &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;" &amp;=20 MegaBytes(Subfolder.Size) &amp; "=20 MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;if=20 objFSO.FileExists(UCase(SubFolder.Path &amp; = "\Profile\Profile.pds\NTUSER.DAT"))=20 Then<BR>&nbsp;&nbsp;&nbsp;Set NTuserDat =3D = objFSO.GetFile(UCase(SubFolder.Path=20 &amp; = "\Profile\Profile.pds\NTUSER.DAT"))<BR>&nbsp;&nbsp;&nbsp;NTuserDatMod = =3D=20 NTuserDat.DateLastModified<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;NTuse= rDatMod=20 =3D ""<BR>&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;If=20 objFSO.FileExists(UCase(SubFolder.Path &amp; "\HOME\MAIL\MESSAGES.PST")) = =3D True=20 Then<BR>&nbsp;&nbsp;&nbsp;Set PSTFile =3D = objFSO.GetFile(UCase(SubFolder.Path=20 &amp; "\HOME\MAIL\MESSAGES.PST"))<BR>&nbsp;&nbsp;&nbsp;PSTFileSize =3D=20 MegaBytes(PSTFile.Size)<BR>&nbsp;&nbsp;&nbsp;PSTFileMod =3D=20 PSTFile.DateLastModified<BR>&nbsp;&nbsp;Else<BR>&nbsp;&nbsp;&nbsp;PSTFile= Size =3D=20 "0"<BR>&nbsp;&nbsp;&nbsp;PSTFileMod =3D ""<BR>&nbsp;&nbsp;End=20 If<BR>&nbsp;<BR>&nbsp;&nbsp;jpgcount=3D0<BR>&nbsp;&nbsp;jpgsize=3D0<BR>&n= bsp;&nbsp;pptcount=3D0<BR>&nbsp;&nbsp;pptsize=3D0<BR>&nbsp;&nbsp;mpgcount= =3D0<BR>&nbsp;&nbsp;mpgsize=3D0<BR>&nbsp;&nbsp;mpegcount=3D0<BR>&nbsp;&nb= sp;mpegsize=3D0<BR>&nbsp;&nbsp;mp3count=3D0<BR>&nbsp;&nbsp;mp3size=3D0<BR= >&nbsp;&nbsp;wmvcount=3D0<BR>&nbsp;&nbsp;wmvsize=3D0<BR>&nbsp;&nbsp;wavco= unt=3D0<BR>&nbsp;&nbsp;wavsize=3D0<BR>&nbsp;&nbsp;execount=3D0<BR>&nbsp;&= nbsp;exesize=3D0</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set=20 objFolderS =3D=20 objFSO.GetFolder(Subfolder.Path)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;=20 Set colFilesS =3D objFolderS.Files</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;For Each objFileS in=20 colFilesS<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D = ".jpg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;jpgcount=3Djpgcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;jpgsize=3Djpgsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".ppt"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;pptcount=3Dpptcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;pptsize=3Dpptsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".mpg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mpgcount=3Dmpgcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;mpgsize=3Dmpgsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 5)) =3D ".mpeg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mpegcount=3Dmpegcount+1<BR>&nbsp;&nbsp;&n= bsp;&nbsp;mpegsize=3Dmpegsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".mp3"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mp3count=3Dmp3count+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;mp3size=3Dmp3size+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".wmv"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;wmvcount=3Dwmvcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;wmvsize=3Dwmvsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".wav"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;wavcount=3Dwavcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;wavsize=3Dwavsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".exe"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;execount=3Dexecount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;exesize=3Dexesize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 Next<BR>&nbsp;<BR>&nbsp;&nbsp;SearchSubfolders(objFSO.GetFolder(Subfolder= .Path))</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;If=20 objUserList.Exists(UCase(SubFolder.Path &amp; "\Profile\Profile.pds"))=20 Then<BR>&nbsp;&nbsp;&nbsp;Set oUserAccount =3D GetObject("WinNT://" = &amp;=20 DomainString &amp; "/" &amp; objUserLIst.Item(UCase(SubFolder.Path &amp; = "\Profile\Profile.pds")) &amp; ",user")<BR>&nbsp;&nbsp;&nbsp;If=20 oUserAccount.AccountDisabled = Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;UserDisabledhtm =3D=20 "&lt;font color=3Dred face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp;=20 "&gt;-YES-&lt;/font&gt;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;UserDisabled =3D=20 "-Yes-"<BR>&nbsp;&nbsp;&nbsp;Else&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;UserDi= sabledhtm=20 =3D "No"<BR>&nbsp;&nbsp;&nbsp;&nbsp;UserDisabled =3D = "No"<BR>&nbsp;&nbsp;&nbsp;End=20 If<BR>&nbsp;&nbsp;&nbsp;UserLastLoginTime =3D=20 oUserAccount.LastLogin<BR>&nbsp;&nbsp;&nbsp;msg.writehtml("&lt;table = width=3D"=20 &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; "&gt;&lt;tr&gt;&lt;td = width=3D" &amp;=20 QUOTE &amp; "50%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; "top" = &amp;=20 QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System" &amp;=20 QUOTE &amp; "&gt;USER ID: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; oUserAccount.Name &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "50%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Full Name:=20 &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp; "&gt;"=20 &amp; oUserAccount.FullName &amp;=20 "&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 msg.writehtml("&lt;table width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE = &amp;=20 "&gt;&lt;tr&gt;&lt;td width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE = &amp; "=20 valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; "&gt;&lt;font = color=3Dcyan=20 face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;DESCRIPTION:=20 &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp; "&gt;"=20 &amp; OUserAccount.Description &amp;=20 "&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;&nbsp= ;msg.writehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "50%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;DISABLED: &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; UserDisabledhtm &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "50%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Last Login:=20 &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp; "&gt;"=20 &amp; UserLastLoginTime &amp; "=20 MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;&nbs= p;OutputFile.WriteLine(SubFolder.Name=20 &amp; "," &amp; MegaBytes(Subfolder.Size) &amp; "," &amp; = oUserAccount.Name=20 &amp; "," &amp; oUserAccount.FullName &amp; "," &amp; = oUserAccount.Description=20 &amp; "," &amp; UserLastLoginTime &amp; "," &amp; UserDisabled &amp; "," = &amp;=20 NTuserDatMod &amp; "," &amp; PSTFileSize &amp; "," &amp; PSTFileMod = &amp; ","=20 &amp; jpgcount &amp; "," &amp; MegaBytes(jpgsize) &amp; "," &amp; = pptcount &amp;=20 ","&nbsp; &amp; MegaBytes(pptsize) &amp; ","&nbsp; &amp; mpgcount &amp;=20 ","&nbsp; &amp; MegaBytes(mpgsize) &amp; ","&nbsp; &amp; mpegcount &amp; = ","&nbsp; &amp; MegaBytes(mpegsize) &amp; ","&nbsp; &amp; mp3count &amp; = ","&nbsp; &amp; MegaBytes(mp3size) &amp; ","&nbsp; &amp; wmvcount &amp;=20 ","&nbsp; &amp; MegaBytes(wmvsize) &amp; "," &amp; wavcount &amp; "," = &amp;=20 MegaBytes(wavsize) &amp; "," &amp; execount &amp; "," &amp;=20 MegaBytes(exesize))<BR>&nbsp;&nbsp;&nbsp;GoodCount=3DGoodCount+1<BR>&nbsp= ;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;msg.writehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; " align=3D" &amp; QUOTE &amp; = "Center"=20 &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font size=3D" &amp; QUOTE &amp; "6" &amp; QUOTE &amp; " = color=3Dred face=3D"=20 &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;------ NO USER ID = ATTACHED=20 ------&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;= &nbsp;OutputFile.WriteLine(SubFolder.Name=20 &amp; "," &amp; MegaBytes(Subfolder.Size) &amp; ", , , , , ," &amp; = NTuserDatMod=20 &amp; "," &amp; PSTFileSize &amp; "," &amp; PSTFileMod &amp; "," &amp; = jpgcount=20 &amp; "," &amp; MegaBytes(jpgsize) &amp; "," &amp; pptcount &amp; = ","&nbsp;=20 &amp; MegaBytes(pptsize) &amp; ","&nbsp; &amp; mpgcount &amp; ","&nbsp; = &amp;=20 MegaBytes(mpgsize) &amp; ","&nbsp; &amp; mpegcount &amp; ","&nbsp; &amp; = MegaBytes(mpegsize) &amp; ","&nbsp; &amp; mp3count &amp; ","&nbsp; &amp; = MegaBytes(mp3size) &amp; ","&nbsp; &amp; wmvcount &amp; ","&nbsp; &amp;=20 MegaBytes(wmvsize) &amp; "," &amp; wavcount &amp; "," &amp; = MegaBytes(wavsize)=20 &amp; "," &amp; execount &amp; "," &amp;=20 MegaBytes(exesize))<BR>&nbsp;&nbsp;&nbsp;BadCount=3DBadCount+1<BR>&nbsp;&= nbsp;<BR>&nbsp;&nbsp;End=20 If<BR>&nbsp;&nbsp;Count=3DCount+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;=20 msg.writehtml("&lt;table width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE = &amp;=20 "&gt;&lt;tr&gt;&lt;td width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE = &amp; "=20 valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; "&gt;&lt;font = color=3Dcyan=20 face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;PROFILE DATE: = &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE = &amp; "&gt;"=20 &amp; NTuserDatMod &amp;=20 "&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;msg.w= ritehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;MESSAGES.PST: = &lt;/font&gt;&lt;/font&gt;&lt;/td&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; "SIZE: &lt;/font&gt;&lt;font = face=3D"=20 &amp; QUOTE &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; PSTFileSize = &amp; "=20 MB&lt;/font&gt;&lt;/tb&gt;&lt;td width=3D" &amp; QUOTE &amp; "50%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;LAST=20 MODIFIED: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" = &amp; QUOTE=20 &amp; "&gt;" &amp; PSTFileMod &amp;=20 "&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;msg.w= ritehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;JPG's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; jpgcount &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "25%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;" &amp; "=20 Size: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; = QUOTE &amp;=20 "&gt;" &amp; MegaBytes(jpgsize) &amp; " MB&lt;/font&gt;&lt;/tb&gt;&lt;td = width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;PPT's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; pptcount &amp; = "&lt;/tb&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;Size: &lt;/font&gt;&lt;font face=3D" = &amp; QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; MegaBytes(pptsize) &amp; " = MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;msg.= writehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;MPG's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; mpgcount &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "25%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;" &amp; "=20 Size: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; = QUOTE &amp;=20 "&gt;" &amp; MegaBytes(mpgsize) &amp; " MB&lt;/font&gt;&lt;/tb&gt;&lt;td = width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;MPEG's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; mpegcount &amp; = "&lt;/tb&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;Size: &lt;/font&gt;&lt;font face=3D" = &amp; QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; MegaBytes(mpegsize) &amp; = "=20 MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")<BR>&nbsp;&nbsp;msg.= writehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;MP3's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; mp3count &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "25%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;" &amp; "=20 Size: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; = QUOTE &amp;=20 "&gt;" &amp; MegaBytes(mp3size) &amp; " MB&lt;/font&gt;&lt;/tb&gt;&lt;td = width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;WMV's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; wmvcount &amp; = "&lt;/tb&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;Size: &lt;/font&gt;&lt;font face=3D" = &amp; QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; MegaBytes(wmvsize) &amp; " = MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;")&nbsp;&nbsp;<BR>&nbs= p;&nbsp;msg.writehtml("&lt;table=20 width=3D" &amp; QUOTE &amp; "100%" &amp; QUOTE &amp; = "&gt;&lt;tr&gt;&lt;td width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;WAV's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; wavcount &amp;=20 "&lt;/font&gt;&lt;/td&gt;&lt;td width=3D" &amp; QUOTE &amp; "25%" &amp; = QUOTE=20 &amp; " valign=3D" &amp; QUOTE &amp; "top" &amp; QUOTE &amp; = "&gt;&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;" &amp; "=20 Size: &lt;/font&gt;&lt;font face=3D" &amp; QUOTE &amp; "System" &amp; = QUOTE &amp;=20 "&gt;" &amp; MegaBytes(wavsize) &amp; " MB&lt;/font&gt;&lt;/tb&gt;&lt;td = width=3D"=20 &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; QUOTE &amp; = "top"=20 &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE &amp; = "System"=20 &amp; QUOTE &amp; "&gt;EXE's : &lt;/font&gt;&lt;font face=3D" &amp; = QUOTE &amp;=20 "System" &amp; QUOTE &amp; "&gt;" &amp; execount &amp; = "&lt;/tb&gt;&lt;td=20 width=3D" &amp; QUOTE &amp; "25%" &amp; QUOTE &amp; " valign=3D" &amp; = QUOTE &amp;=20 "top" &amp; QUOTE &amp; "&gt;&lt;font color=3Dcyan face=3D" &amp; QUOTE = &amp;=20 "System" &amp; QUOTE &amp; "&gt;Size: &lt;/font&gt;&lt;font face=3D" = &amp; QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;" &amp; MegaBytes(exesize) &amp; " = MB&lt;/font&gt;&lt;/tb&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;")<BR>&nbsp;N= ext</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial=20 size=3D2>&nbsp;msg.writehtml("")<BR>&nbsp;msg.writehtml(VbCrLf &amp; = "&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Folders=20 Listed: " &amp; Count &amp; = "&lt;/font&gt;")<BR>&nbsp;msg.writehtml("&lt;font=20 color=3Dcyan face=3D" &amp; QUOTE &amp; "System" &amp; QUOTE &amp; = "&gt;Folders=20 Listed w/ Users Attached: " &amp; GoodCount &amp;=20 "&lt;/font&gt;")<BR>&nbsp;msg.writehtml("&lt;font color=3Dcyan face=3D" = &amp; QUOTE=20 &amp; "System" &amp; QUOTE &amp; "&gt;Folders Listed w/o Users Attached: = " &amp;=20 BadCount &amp; "&lt;/font&gt;")<BR>&nbsp;OutputFile.WriteLine(VbCrLf = &amp;=20 "Folders Listed: " &amp; Count)<BR>&nbsp;OutputFile.WriteLine("Folders = Listed w/=20 Users Attached: " &amp; = GoodCount)<BR>&nbsp;OutputFile.WriteLine("Folders Listed=20 w/o Users Attached: " &amp; = BadCount)<BR>&nbsp;OutputFile.Close</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>&nbsp;msg.complete<BR>&nbsp;DataArea.InnerHTML =3D=20 "Complete"<BR>&nbsp;window.close</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>End Sub</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Sub = SearchSubFolders(Folder)<BR>&nbsp;msg.write("it=20 made it here to subfolders")<BR>&nbsp;&nbsp;&nbsp; For Each SubfolderS = in=20 Folder.SubFolders<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set = objFolderS =3D=20 objFSO.GetFolder(SubfolderS.Path)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;=20 Set colFilesS =3D objFolderS.Files<BR>&nbsp;&nbsp;For Each objFileS in=20 colFilesS<BR>&nbsp;&nbsp;&nbsp;msg.write("it made it here to=20 subfolders")<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D = ".jpg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;jpgcount=3Djpgcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;jpgsize=3Djpgsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".ppt"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;pptcount=3Dpptcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;pptsize=3Dpptsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".mpg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mpgcount=3Dmpgcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;mpgsize=3Dmpgsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 5)) =3D ".mpeg"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mpegcount=3Dmpegcount+1<BR>&nbsp;&nbsp;&n= bsp;&nbsp;mpegsize=3Dmpegsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".mp3"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;mp3count=3Dmp3count+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;mp3size=3Dmp3size+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".wmv"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;wmvcount=3Dwmvcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;wmvsize=3Dwmvsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".wav"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;wavcount=3Dwavcount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;wavsize=3Dwavsize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;if LCase(Right(objFileS.Name, 4)) =3D ".exe"=20 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;execount=3Dexecount+1<BR>&nbsp;&nbsp;&nbs= p;&nbsp;exesize=3Dexesize+objFileS.Size<BR>&nbsp;&nbsp;&nbsp;end=20 if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 Next<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 SearchSubFolders(SubfolderS)<BR>&nbsp;&nbsp;&nbsp; Next<BR>End = Sub</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Function = MegaBytes(MB)<BR>&nbsp;MegaBytes =3D MB /=20 1048576<BR>&nbsp;MegaBytes =3D Int(MegaBytes)<BR>End = Function</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Function=20 Minimize<BR>&nbsp;window.blur<BR>&nbsp;moveTo 2000,2000<BR>End=20 Function</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&lt;/SCRIPT&gt;<BR>&lt;body = STYLE=3D"font:14 pt=20 arial;=20 color:white;<BR>&nbsp;filter:progid:DXImageTransform.Microsoft.Gradient<B= R>(GradientType=3D1,=20 StartColorStr=3D'#000000', EndColorStr=3D'#0000FF')"&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&lt;table = width=3D"100%"&gt;&lt;tr&gt;&lt;td=20 width=3D"25%" valign=3D"top"&gt;&lt;font size=3D"3"&gt;Domain:=20 &lt;/font&gt;&lt;/td&gt;&lt;td width=3D"75%" valign=3D"top"&gt;&lt;input = type=3D"text"=20 name=3D"Domain" value=3D"ESUALAMEDA"=20 size=3D"100"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<BR>&lt;table=20 width=3D"100%"&gt;&lt;tr&gt;&lt;td width=3D"25%" = valign=3D"top"&gt;&lt;font=20 size=3D"3"&gt;Share: &lt;/font&gt;&lt;/td&gt;&lt;td width=3D"75%"=20 valign=3D"top"&gt;&lt;input type=3D"text" name=3D"SharePath" value=3D"<A = href=3D"file://\\SANPEDROBDCF\USERSESD">\\SANPEDROBDCF\USERSESD</A>"=20 size=3D"100"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<BR>&lt;table=20 width=3D"100%"&gt;&lt;tr&gt;&lt;td width=3D"25%" = valign=3D"top"&gt;&lt;font=20 size=3D"3"&gt;Output Filename: &lt;/font&gt;&lt;/td&gt;&lt;td = width=3D"75%"=20 valign=3D"top"&gt;&lt;input type=3D"text" name=3D"OutputCSV" = value=3D"OUTPUT.CSV"=20 size=3D"100"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<BR>&lt;p&gt;<BR>&lt;= center&gt;&lt;input=20 type=3D"button" value=3D"Start" name=3D"run_button"=20 onClick=3D"RunScript"&gt;<BR>&lt;p&gt;<BR>&lt;span id =3D=20 "DataArea"&gt;&lt;/span&gt;<BR>&lt;p&gt;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>&lt;/body&gt;<BR>&lt;/html&gt;<BR></FONT></DIV> <DIV>&nbsp;<SPAN = id=3D__#Ath#SignaturePos__></SPAN>&nbsp;</DIV></BODY></HTML> ------=_NextPart_000_0006_01C5CDB0.E696D530-- Tag: Registry error Tag: 181845
      • 4
        • wmi - filtering auditing entries to text file Hi, I am trying to collect logs using wmi of auditing entries in the event viewer of domain controllers. I noticed that the security auditing correctly logs the GUID of the policy being modified; unfortunately when I collect it using wmi this name, and others, are lost and replaced by different value like %{bf967a76-0de6-11d0-a285-00aa003049e2}. How do I retain these important information ? Can I use any other tools ? Thanks and Regards Tag: Registry error Tag: 181844
      • 5
        • Referencing Shell.Application in a wsf script Hello, I tried to poke around a bit with "Shell.Application". Because of the possibility to include typelib informations with the reference tag, I created a wsf-script with this content: <?xml version="1.0" encoding="windows-1252" ?> <package> <job> <reference object="Shell.Application"/> <script language="vbscript"> <![CDATA[ Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(0, "Example", 0, ssfPERSONAL) ]]> </script> </job> </package> But this didn't worked. The error was something like "reference from {50a7e9b0-70ef-11d1-b75a-00a0c90564fe} could not be included". (The message was in german so I have to translate). The problem was solved with the line <reference guid="{50a7e9b0-70ef-11d1-b75a-00a0c90564fe}"/> instead of the orginal line. Why did the reference tag with the object-attribute not work? Regards, Tobias Tag: Registry error Tag: 181842
      • 6
        • ASP Page moved to IIS 6.0 no longer works I'm in the process of moving an application from IIS under Windows 2000 to a new server running Windows 2003 and IIS 6.0. One of the pages uses the wshell.script object to execute a batch file that executes ftp commands from a text file. This one page no longer works. I have tweaked the permissions for the asp page, batch file, cmd.exe and ftp.exe so that I no longer get permission denied errors. The page is served with a result code of 200 but simply does nothing. The batch file doesn't appear to contain any errors as I can execute it from a command prompt with no problem. It produces output which is just ignored on the old server. Heres the relevent ASP code: Dim oScript Set oScript = Server.CreateObject("WSCRIPT.SHELL") oScript.Run "c:\progra~1\dqcomp~1\dqvista\users\shared\PDI\ftpfaxflag.bat" I've also tried the following: ' Call oScript.Run ("ftp.exe -s:" & Server.Mappath("ftpcmds.txt") Here's the batch file: ftp -s:c:\progra~1\dqcomp~1\dqvista\users\shared\pdi\ftpcmds.txt Here's the ftpcmds.txt file: open <mainframe name> <usercode> <password> cd <mainframe directory> lcd \progra~1\dqcomp~1\dqvista\users\shared\pdi put faxflag.txt FLAGTEST quit Any help will be greatly appreciated. Tag: Registry error Tag: 181840
      • 7
        • Check Reg script Any one an example of a script that I can attach in GPO Login to check if the value exists in the registry if = yes then go to next procedure if=no then run the particular setup.exe file. Thanks. Tag: Registry error Tag: 181838
      • 8
        • automate profile swop: roaming to local sorry to trouble you all again but you don't happen to know how to automate the change that you can do to peoples profiles: swopping them from roaming to local. For example: in system if you click the user profile tab you can change the type to local from roaming for the domain users What I need to do is, maybe in group policies automate this for all domain user instead of doing one by one. reason their taking for every to load across the link I've tried console root>local computer policy>computer configuration>Administrative template>system>user profile and then clicking on 'only allow local user profiles' but this block my users logon scripts - which is no good any ideas? Tag: Registry error Tag: 181837
      • 9
        • Conditional Window Close Hello, I would like to have a script that closes a specific window if it opens. I'm able to easily do this in Winbatch as well as Autoit, but can't seam to figure it out in VBScript. Anyone have any ideas on how to do this? Thanks in advance for your assistance! -=Paraleptropy=- http://www.neflyfishing.net 0 Limit,Catch -n- Release ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- Tag: Registry error Tag: 181826
      • 10
        • number formatting I have a field returned from a query. This field will either be a number or a string, the string will be a code that explains why there is no number. I use a function to sort that out (see bottom of this post) Now I have a number 94.8892254 in str If I run FormatNumberIfNumeric(str) I get "95" I should get "95.00". How do I fix this? Thanks MIke Function FormatNumberIfNumeric(str) If Isnumeric(str) then FormatNumberIfNumeric = FormatNumber(str, 2, -1, 0, 0) Else If str = "" or ISNull(str) then FormatNumberIfNumeric = "<b>???</b> " Else FormatNumberIfNumeric = str & "boo" End If End If End Function Tag: Registry error Tag: 181823
      • 11
        • RDP logn script override? Firstly greetings everyone, I've got a slight problem: scenario: I've got 2 sites using 1 SBS box for logon authentication rights to the domain. 1 site has 1 set of scripts allowing them to access the drives in their building and the same for the users in the other building. My problem is that when the users logon to the RDP boxes I have setup for them to access data in the opposite site they take their logon scrip with them which of cause scripts the completely inappropriate drives. has anyone found a solution for this problem? thank you in advance OSL Tag: Registry error Tag: 181821
      • 12
        • removing non network printers from a computer Hi. We have a small script that we run on cumputers that log in to the domain, the script deletes all printers and then addes a few. We have a slight problem with the deletion of printers. When the printer is not a network printer, the script will stop with the error (here for the printer "Microsoft Office Document Image Writer": Script: c:\thescript.vbs Row: X Col: Y Error: This network connection Code: 800708CA Source: WSHNetwork.RemoveNetworkDrive The script looks like this and the row that generates the error is the one marked with "*". ' Begin removing all installed network printers Set clPrinters = objWshNetwork.EnumPrinterConnections For i = 0 to clPrinters.Count - 1 Step 2 'wscript.echo clPrinters.Item(i+1) + " deleted." * objWshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true, true Next Any suggestions on how to avoid removing non network drives? /kb Tag: Registry error Tag: 181819
      • 13
        • IE Favorites Rediection I need a script to redirect a users IE Favorites to a central location on a file server. Just as we have the option to redirect a users My Documents, Desktop and Apllication Data folder from his profile. I need the script desperately. Tag: Registry error Tag: 181818
      • 14
        • Event log SQL query problem Hi all, I have a problem using a select statement when querying event logs. I use the following statement: ------ Set colLoggedEvents = objWMIService.ExecQuery _ ("Select * from Win32_NTLogEvent Where (LogFile = 'Security' And EventType = '5')" & _ "Or (LogFile = 'System' And EventType = '1')") ------ When executing I only get entries from the Security event log. Before I tried this statement: ------ Set colLoggedEvents = objWMIService.ExecQuery _ ("Select * from Win32_NTLogEvent Where (EventType = 1 Or EventType = 5)") ------ When executing that one I only receive entries from the Application log, which is - I guess - the first one that is analyzed by the script. So please could someone tell me if and how I could get entries from multiple event logs with one query? TIA, The Kirschi Tag: Registry error Tag: 181816
      • 15
        • File Not Found Error - UNC? Afternoon, I am working through getting a script to grab a file name and the date it was last modified and am not having any luck with the UNC it would appear. The script is below and it is erroring on the line below: Set DatZipFile = fso.GetFile(DatFilePath + Text) If I msgbox (DatFilePath + Text) the path is correct. I have tried using the files collection method but I can't properly filter for the file im looking for. Any help would be greatly appreciated Cheers Rob. ----------------------------------------------------------------------------- set shell = createobject("wscript.shell") Set WshNetwork = WScript.CreateObject("WScript.Network") const DatFilePath="\\server\c$\Program Files\McAfee\ePO\3.0.1\DB\Software\" set TheArgs = WScript.Arguments NetworkD = TheArgs.Item(0) NetworkDrive = NetworkD + ":" WshNetwork.MapNetworkDrive NetworkDrive,"\\server\c$" cmd = "%comspec% /c dir dat-*.zip /b | sort" shell.currentdirectory = NetworkDrive + "\Program Files\McAfee\ePO\3.0.1\DB\Software\" set dir = shell.exec(cmd) text = "" do while true if not dir.stdout.atendofstream then text = text & dir.stdout.readall end if if dir.status = 1 then exit do wscript.sleep 100 loop WshNetwork.RemoveNetworkDrive (NetworkDrive),true set shell = Nothing set WshNetwork = Nothing Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Set DatZipFile = fso.GetFile(DatFilePath + Text) Modified = DatZipFile.DateLastModified ------------------------------------------------------------------------------ Tag: Registry error Tag: 181815
      • 16
        • include folder prior to a folder in a vbscript I'm loving this Mp3Playlister_multiList vbs script. ( http://www.interclasse.com/scripts/Mp3Playlister_multiList.php) It creates playlists recursively, but I have one request. Since I have my mp3's arranged by c:\Artist\Album, the script saves as Album.m3u. Could someone help modify it for me to save as Artist - Album.m3u. I'm thinking that it would be modified here... Sub createAndSavePlaylist(arrFiles, foldName) Dim txt, txtFile, txtPath '-- m3u file path txtPath = dicPlaylistsPath.item(sScannedFoldName) & foldName &"."& sPlaylistExt '-- create m3u file (ASCII) If Not fso.FileExists(txtPath) Then Set txtFile = fso.CreateTextFile(txtPath,true,false) 'ASCII !! End If Set txtFile = fso.GetFile(txtPath) Set txt = txtFile.OpenAsTextStream(ForWriting, 0) 'ForWriting , 0 for ASCII (-1 for Unicode) '-- write m3u entries txt.write Join(arrFiles, vbCrLf) txt.close Set txtFile = nothing End Sub I'd greatly appreciate it. thanks, James Tag: Registry error Tag: 181809
      • 17
        • vb script for click a button on a open program window I am really new to vbscript, I have a program that loads when my computer starts up. After windows has loaded, the program has a form that has two buttons on it. One is "Hide" the other is "Close Program". I would like to write a vb script that ran at startup as well and would automatically click the "Hide" button on this program when it loaded. I am first just trying to write the vbscript for clicking the Hide button on the open form. then I will figure the adding it to the start up. If anyone new of any examples that would help me or could provide some general code I would greatly appreciate it. Tag: Registry error Tag: 181807
      • 18
        • Moving VBScript to HTML or HTA <lenghty post> Hi all! I have a VBScript that I'm using to set my computer up to wake me up in the morning - basically an excuse to teach myself some basic scripting. Here's the meat of the script: """"""""""""""""""""""""""""""""""""""" Dim objShell, objFSO, objTSOut, strDay, strMonth, strYear, strHour, strMinute, strNow strDay = InputBox("Enter day of month") strMonth = InputBox("Enter the month") strYear = InputBox("Enter the year") strHour = InputBox("Hour") strMinute = InputBox("Minute?") strNow = Date Set objShell = WScript.CreateObject("WScript.Shell") Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Set objTSOut = objFSO.CreateTextFile ("C:\Batch\SetAlarm.cmd",true) objTSOut.WriteLine "Schtasks.exe /Create /S COMPUTER /RU user /RP password /SC ONCE /SD " _ & strYear & "/" & strMonth & "/" & strDay & " /TN WakeUpCall_" & strNow & " /TR C:\Batch\ScheduledWakeupCall.vbs /ST " & strHour & ":" & strMinute & ":00" objTSOut.Close objShell.Run "C:\Batch\SetAlarm.cmd" """"""""""""""""""""""""""""""""""""""""""""""" So, it's actually a script that collcts info and creates a cmd file that uses the 'Schtasks.exe' command to set up a scheduled task in Windows. The task it schedules is in this case script that starts Media Player with a specific playlist - a pretty nice way to wake up in the morning. :-) Now, I would like to move this to a HTML or HTA file, just to see how it works, and to get a nicer user interface. What I'm after is: how to get user input from radio buttons, drop down boxes and so on, instead of the input boxes I get with a vbs file. I have no clue how to capture the input from forms, so I'm flying blind here and need some help. Any ideas?? TIA, Örjan </lengthy post> Tag: Registry error Tag: 181806
      • 19
        • After Update/ on change Hi currently i am developing a few data access pages to enable users to enter data from an intranet. i am more than confortable in developin access databases but have only recently touvhed upon DAP. I can program with access using VBA. What i would like to do is the following: a) When the record has been saved successfully to be able to display an message box. I have been using VBScript and the function MsgBox, but nothing appears, this has been used in the event After Update on the MSODSC object. Any body know how to do this? b) The Save button i would like to be disabled unitl a user makes changes or creates a new record. i am presuming that i would be using the onchange event, how could i do this? many thanks D Tag: Registry error Tag: 181802
      • 20
        • FSO Can i retrieve the file owner name by FSO? i wish to show it at my asp page. the page shows the files list in a folder. Thanks. tony Tag: Registry error Tag: 181794
      • 21
        • Writing and debugging VBS Hi everyone I've used the Visual Basic Editor in Word and Excel 2003 and have decided to delve into VBS. I've managed to copy script samples from various sites, paste them into Notepad and save the file with a .vbs extension. Needless to say, the samples do what they're supposed to but, if I modify the code to do something slightly different, it either works or it doesn't. If it doesn't, an error messagebox is displayed which gives an idication of where the error is. I wonder if there's any software available to allow me to step through the VBS and identify exactly what's happening as it runs, just as I can with the VB editors in Word and Excel. I don't know if there's anything on my laptop already (XP Pro SP2) or if I'd need third party software. Whilst experts here are just that, I'd find it hard to believe that they can just generate a perfect piece of complicated code out of thin air or debug it, almost as if it's running in their heads! Thanks for your time and patience. Tag: Registry error Tag: 181791
      • 22
        • Adding old domain user to Local Admins group Hey folks, I wonder if anyone knows of a script to do the following: After migrating a workstation from an NT to an AD domain, I want to read which old-domain-users are members of the Local Admins group and add their new-domain accounts into that group. Been looking for ages and haven't found anything yet. Thanks and best regards, Ferg. Tag: Registry error Tag: 181789
      • 23
        • Adding old domain user to Local Admins group Hey folks, I wonder if anyone knows of a script to do the following: After migrating a workstation from an NT to an AD domain, I want to read which old-domain-users are members of the Local Admins group and add their new-domain accounts into that group. Been looking for ages and haven't found anything yet. Thanks and best regards, Ferg. Tag: Registry error Tag: 181788
      • 24
        • Run method in ASP - app hidden.... Hi all! I'm trying to move a VBScript to ASP. One of the problems I'm having is when using the run method. I don'tr seem to be having any syntax or permission errors, but the app I'm trying to run from the asp page isn't visible. I thought the code failed all together, but when opening task manager, I can se that the app is indeed running (under the 'IWAM_computername' account), only it's not visible. Any ideas what I'm doing wrong? I'm running the app like this in the asp page: <%Set objShell = Server.CreateObject("WScript.Shell")%> <%objShell.Run "notepad.exe", 3%> I've tried different values for 'window style', but it doesn't seem to matter. I done quite a bit of scripting using VBScript, but am totally new to using it in asp. Any input appreciated! TIA, Örjan Tag: Registry error Tag: 181780
      • 25
        • Error when using CreateObject in client side VBScript. Hi there Apologies if this is not quite the correct group but I am having trouble trying to create various objects using the VBScript CreateObject function inside a client side HTML page. The following is the complete code of a test page that I put together. '=============================================== <html><head><title>Test CreateObject</title> <script language=VBScript> Dim objNetwork On Error Resume Next Err.Clear Set objNetwork = CreateObject("WScript.Network") If Err.Number <> 0 Then MsgBox Err.Description Else MsgBox objNetwork.UserDomain End If Set objNetwork = Nothing </script></head><body> This is a test </body></html> '=============================================== Whenever I open this page, the CreateObject function errors and the displayed error message is "ActiveX component can't create object". I have tried creating various other ActiveX objects (eg Excel.Application) but still get the same error. I know that this code is the correct syntax etc because I have run it successfully in a VBS file (without the HTML obviously). I have tested the code on three machines with the following specs. All display the same error message. 1. WinXP, SP2, IE6.0.2900 2. WinXP, SP1, IE6.0.2800 3. Win2k, SP4, IE6.0.2800 I've had a look at IE's security settings and found no problems there. Had a look at the Local Security Policy but also found nothing. I've also had a bit of a poke around on the internet and couldn't find anything significant that would indicate what the problem could be. If anyone could help me out on this, it will be greatly appreciated. Regards David Tag: Registry error Tag: 181777
    • Next
      • 1
        • vbs script for Excel to color rows I was wonder if someone would mind writting me a small script to help me out. I have a HUGE spreadsheet that has one colum which is numbered sequentially, but any number may be repeated 2 or mor times. There are many other colums which contain data, so this will help with readability. Example: 1 1 1 2 2 3 3 3 3 4 4 5 5 5 5 I want to color each *row* (not the cell, but the whole row) of the same number the same color. Here is my "program logic" in psudeo-code Rowcolor = 1 Currentcontents = value of current cell Nextcontents = value of current cell Do while value of current cell is not blank If nextcontents = currentcontents then Set row color = rowcolor Move down one cell Nextcontents = value of current cell Else Rowcolor = rowcolor + 1 Currentcontents = nextcontents End if End Do I'm sure this is very simple for those who know vbs - I just don't and can't find anyother way to accomplish this. Doing it manually would take FOREVER as the spreadsheet has over 30,000 rows. Thanks very much to anyone will to help out!!! Mike Tag: Registry error Tag: 181772
      • 2
        • Item Cannot be Found in Collection For over 3 years I have used the same Question and Answer Web Page without any changes to the page or Access Database. Three weeks ago I started getting the Item Cannot be Found in Collection halt after I did a Microsoft update. The Record has 47 fields that are updated for test surveys by the activities educators in our school district. 33 Fields are Long Integer, 13 are Byte Fields and one a Text Field. Does anyone know what was changed that would all of a sudden give me this halt. Thanks for the help in advance! Granny Tag: Registry error Tag: 181768
      • 3
        • VB script, batch, or C++ for text file creation program Hello all. I'm trying to compile a text file from two different existing text files and input from the user. For example: text1.txt says "It was the best of times it was the worst of times." text2.txt says "To be or not to be that is the question." When the program is run, a prompt would ask the user to write a sentence. The program would then create a new file named text3.txt that would create a text file that would read: It was the best of times it was the worst of times. Now is the winter of our discontent <or whatever the user enters at a prompt> To be or not to be that is the question. I'm trying to decide the best vehicle to use to write this program. It doesn't matter to me if its run in a GUI environment or from the console. I'm rusty with my file manipulations in C++, which is the language I'm most familar with. Neither batch nor vbscript look overly difficult to pick up and I would like to use either of them if they lend themselves better to the task at hand. What do all of you think? Thanks a lot for the advice Tag: Registry error Tag: 181767
      • 4
        • WMI - Filter auditing categories Hi, I'm not able to find the IDs that map to the various Auditing categories. As you know WMI uses these IDs to filter on the category but where do I find these IDs. I know that for example Account Management uses ID 7, what about other categories ? To be more specific I need the ID for Directory Service Access. Thanks and Regards Tag: Registry error Tag: 181762
      • 5
        • Write back to AD script. Is there a script that will display Full Users name and Telephone number and ask user to change the number if not correct and write back to AD. Tag: Registry error Tag: 181760
      • 6
        • Page not able to display Dear Experts, I am trying to link one of my menu to a login screen of my program. After I create the hyperlink to open the page which is a login page, instead of the login page display in the window, the entire code is being displayed. I have checked with the previous code which I don't find difference. Below is my code: <table border=0 cellpadding='1' cellspacing=1 width="150"><tr><td width='16'> <font size="3" face="Times New Roman"><img src='text.gif' width='16' height='16' hspace='0' vspace='0' border='0'></font></td><td> <font face="Times New Roman" size="3"> <a target="master" href="Leave_system/applyforleave.asp">Leave Application</a></font></td></tr></table> However, when I use CTRL+ click the link in Design mode, the page does display on the Preview pane. How could or may be the problem to this issue? Thank you very much. Regards, Seok Bee Tag: Registry error Tag: 181758
      • 7
        • navigating a child window in IE Hi, I have some info that needs to be uploaded to a vendor's web app every day, which I'd like to automate this. I am a vbscript newbie. I'm running into problems when I click on a link which pops up another window. It seems like the commands I issue afterwards are still going to the original window. How do I get the script to operate on the child window? Set oMSIE = CreateObject("InternetExplorer.Application") oMSIE.navigate "http://www.myvendor.com" oMSIE.visible=1 Do Until oMSIE.ReadyState = 4 wscript.sleep 10 : Loop Set oIEDoc = oMSIE.Document oIEDoc.links(4).click ' (Child window comes up here and I want commands after this point ' to be directed to it.) Do Until oMSIE.ReadyState = 4 wscript.sleep 10 : Loop oIEDoc.getElementById("textUpload").value = "123456789" Thanks! Tag: Registry error Tag: 181754
      • 8
        • Determine exchange server name Hi Group, I am using a small script which uses the CDO.message object to send emails. The server name is configured by "server.domain.com". However, for security considerations, it appears that the exchange administrator regularly changes the name and/or IP of the exchange server. Our outlook 2003 client doesn't seem to have a problem with this as the server name is automatically updated in the Outlook Profile. However, my scripts fail and I was wondering how Outlook was determining what was the new location of exchange server on the network. Is there a script for doing that? TIA Tag: Registry error Tag: 181752
      • 9
        • Implement a read-only class memeber as a Function or a Property? Hi, Where does one draw the line between Property Get and Function? They both do exactly the same thing, do they not? When should I use Property Get, and when should I use Function? Jamie Tag: Registry error Tag: 181744
      • 10
        • Running a logon script under another account Does anyone know how to run a .vbs logon script under a different account than the account that's logging in? The reason I need to do this is that the script installs a software package if it's not already installed on the machine that the user is logging onto. The Active Directory Group Policy restricts software installation to domain administrators, so I wanted to run this script with elevated priviledges to get around this restriction imposed by the Group Policy. Has anyone effectively dealt with a similar issue? Some background info: --All client machines are Windows XP Pro --Main AD Server (Global Catalog) is 2003. Other domain controllers are 2003 and 2000 Tag: Registry error Tag: 181741
      • 11
        • enumerate network printer Is anyone aware of how to enumerate a network printers nic card. Tag: Registry error Tag: 181739
      • 12
        • Convert SAM to DN with input/output files All- I am trying to add on to a small script I saw posted by Richard Mueller (www.rlmueller.net). His script takes the current logged on user's logon name and determines and displays the DN. I am attempting instead to have the script read a list of logon names (sam account names) and go out and determine the DN for each. Output to be written to a results text file. I am getting a type mismatch error and I can see the problem is related to strNTName but I'm not sure how to correct it. Here is Richard's script (this one works): Set objNetwork = CreateObject("Wscript.Network") strNTName = objNetwork.UserName ' Determine DNS domain name from RootDSE object. Set objRootDSE = GetObject("LDAP://RootDSE") strDNSDomain = objRootDSE.Get("defaultNamingContext") ' Use the NameTranslate object to find the NetBIOS domain name from the ' DNS domain name. Set objTrans = CreateObject("NameTranslate") objTrans.Init 3, strDNSDomain objTrans.Set 1, strDNSDomain strNetBIOSDomain = objTrans.Get(3) ' Remove trailing backslash. strNetBIOSDomain = Left(strNetBIOSDomain, Len(strNetBIOSDomain) - 1) ' Use the NameTranslate object to convert the NT user name to the ' Distinguished Name required for the LDAP provider. objTrans.Init 1, strNetBIOSDomain objTrans.Set 3, strNetBIOSDomain & "\" & strNTName strUserDN = objTrans.Get(1) Wscript.Echo "User DN: " & strUserDN ++++++++++++++++++ Here is the script I am attempting to get working (but not quite there yet): Const ForAppending = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile _ ("c:\results.txt", ForAppending, True) 'Opens existing file for reading list of target names Const INPUT_FILE_NAME = "C:\users.txt" Const FOR_READING = 1 'Opens file and reads all data in file Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(INPUT_FILE_NAME, FOR_READING) strNames = objFile.ReadAll objFile.Close 'Separates file by carriage return/line feed strNTName = Split(strNames, vbCrLf) ' Determine DNS domain name from RootDSE object. Set objRootDSE = GetObject("LDAP://RootDSE") strDNSDomain = objRootDSE.Get("defaultNamingContext") ' Use the NameTranslate object to find the NetBIOS domain name from the ' DNS domain name. Set objTrans = CreateObject("NameTranslate") objTrans.Init 3, strDNSDomain objTrans.Set 1, strDNSDomain strNetBIOSDomain = objTrans.Get(3) ' Remove trailing backslash. strNetBIOSDomain = Left(strNetBIOSDomain, Len(strNetBIOSDomain) - 1) ' Use the NameTranslate object to convert the NT user name to the ' Distinguished Name required for the LDAP provider. For Each strName In strNTName objTrans.Init 1, strNetBIOSDomain objTrans.Set 3, strNetBIOSDomain & "\" & strNTName strUserDN = objTrans.Get(1) objTextFile.WriteLine "User DN: " & strUserDN Next objTextFile.Close +++++++++++++++++++++++++ Any ideas? Thanks. Tag: Registry error Tag: 181738
      • 13
        • error sending mail Hello. I have a following code: ============================================= Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "subject" objMessage.Sender = "email@adres.com" objMessage.To = "email@adres.com" objMessage.TextBody = "BODY" '==This section provides the configuration information for the remote SMTP server. '==Normally you will only change the server name or IP. objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.server.com" 'Server port (typically 25) objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update '==End remote SMTP server configuration section== objMessage.Send ====================================================== The code used to work. But now I get error message "The transport failed to connect to server" code: 80040213 source: cdo.message.1 Can somebody point me in direction to solve this? Thanks Martin Tag: Registry error Tag: 181734
      • 14
        • InstanceModificationEvent not working Hi, I am tryin to figure out why my script isn't working. The script should notify me when a file changes. However, it only notifies me about Creation or Deletion events. I am running XP. Has anyone an idea? strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceOperationEvent WITHIN 10 WHERE " _ & "Targetinstance ISA 'CIM_DirectoryContainsFile' and " _ & "TargetInstance.GroupComponent= " _ & "'Win32_Directory.Name=""C:\\\\Scripts""'") Do While True Set objEventObject = colMonitoredEvents.NextEvent() Select Case objEventObject.Path_.Class Case "__InstanceCreationEvent" WScript.Echo "A new file was just created: " & _ objEventObject.TargetInstance.PartComponent Case "__InstanceDeletionEvent" Wscript.Echo "A file was just deleted: " & _ objEventObject.TargetInstance.PartComponent Case "__InstanceModificationEvent" Wscript.Echo "A file was just modified: " & _ objEventObject.TargetInstance.PartComponent End Select Loop Tag: Registry error Tag: 181730
      • 15
        • bolding text in email output I am using vbscript to generate SMTP emails. I define the To, From, Subject and body of the email with variables. I then set the message variables: With iMsg Set .Configuration = iConf .To = SMTPAddressTo .From = SMTPAddressFrom .Subject = Subject .TextBody = Body End With In the body of the email I need some of the text to be bolded or underlined. I can't figure out how to make this happen. I've tried to use <b> and </b> but it's not working. So, if I have something along the lines of the following, and want to bold the word "must", how would I do it? Body = "All children must do their homework" Thanks, Tag: Registry error Tag: 181727
      • 16
        • Enumerating network shares Hey all, I need to write a simple script that will enumerate all of the shares on our file servers, and the number of user accounts with permissions to each share. The purpose is to evaluate which shares can be deleted to free up disk space by deleting shares with fewer than 10 users. I have found some simple VBScript and JScript code that will enumerate all of the shares on a given server like so: ' Begin code snippit set objFs = GetObject("WinNT://" & strServer & "/LanmanServer,FileService") For Each objShare In objFs strList = strList & vbCr & LCase(objShare.name) & vbTab & UCase(objShare.Description) Next ' End code snippit My problem is that I need to know what other class members/methods are available for the "FileService" (instanced as objFs) In the example above, we use objShare.name and objShare.Description during the loop. In which documentation would I find a list of the other class methods/variables for objShare? I am at wits end, just trying to find the documentation Thanks in advance Tim Tag: Registry error Tag: 181725
      • 17
        • Issues with Scripting.FileSystemObject Hi, I'm using the above function to capture an image on a regular basis and I am having some problems. The piece of code in question is designed to capture an image and save it to a specified location. It as run as a scheduled task so that it is captured at defined intervals. The code in question runs perfectly on all Windows XP machines that I have tried, but does not function as it should on my server running Windows Server 2003 Web Edt. Where the code comes unstuck on WinServ2003 is when it goes to converting the binary data it obtained from accessing the image to text and writing it to the file. The code in question looks like this: <code> Dim Inet, strHTML strHTML = "http://URL" & "/filename.ext" BinarySaveURL strHTML, "C:\filename.ext" Function GetHTTPFile(File) Dim DLText Set DLText = CreateObject("WinHttp.WinHttpRequest.5.1") DLText.Open "GET", File, True DLText.Send If DLText.WaitForResponse(5) = True Then GetHTTPFile = BinToStr(DLText.ResponseBody) End If end function Function BinToStr(Binary) Dim I Dim StrOut For I = 1 To LenB(Binary) StrOut = StrOut & Chr(AscB(MidB(Binary, I, 1))) Next BinToStr = StrOut End Function Sub BinarySaveURL(URL, fn) 'Create an Http object, use any of the four objects Dim Http Set Http = CreateObject("WinHttp.WinHttpRequest.5.1") 'Send request To URL Http.Open "GET", strHTML, False Http.SetCredentials "username", "password", _ HTTPREQUEST_SETCREDENTIALS_FOR_SERVER Http.Send 'Get response data As a string ss = Http.ResponseBody Dim FS Set FS = CreateObject("Scripting.FileSystemObject") 'Create text stream object Dim TextStream Set TextStream = FS.CreateTextFile(fn) 'Convert binary data To text And write them To the file TextStream.Write BinToStr(ss) End Sub </code> It should be noted that WinServ2003 is creating the file in question, but writes no data to it. Can anyone explain why this piece of code will run perfectly on WinXP and not WinServ 2003, and what might need to be done either within the code or on the server in question to allow this to work. All and any help/insight appreciated. Kind Regards, Michael Harris Tag: Registry error Tag: 181723
      • 18
        • Check WMI Connectivity This is a multi-part message in MIME format. ------=_NextPart_000_01FA_01C5CB4A.58582FC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I want to check WMI Connection to all PCs in my domain. Script code is = as following: For Each strComputer in arrComputers Set objWMIService =3D GetObject("winmgmts:\\" & strComputer = &"\root\cimv2") '(*) If Err.Number > 0 Then WScript.Echo strComputer & " - Unable to connect to WMI. Error " = & Err.Number & "-" & Err.Description Err.Clear Else WScript.Echo strComputer & "Connect to WMI: OK!" End If Next WMI, DCOM, COM+ services are running well in all PCs. Domain Group = Policy forces Windows Firewall in all PCs to open port 135 & 445. There're times that WMI Connection to some PCs cannot be successful = because Domain Group Policy are not applied at the PCs. So when the = script runs, it stops at line (*) about 1 hour (If you choose Properties = at WMI Control in Computer Management, you will have to wait a long = time). This issue occurs in all Wins XP SP2 & Wins 2K SP4. This issue can be solved by running command "gpupdate /force" OR = "secedit /refreshpolicy ..." I want to decrease time to wait PCs' WMI unconnectable. I want to know = whether a PC is connectable or not immediately. There is any way? Thanks ------=_NextPart_000_01FA_01C5CB4A.58582FC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV> <DIV><FONT face=3DArial size=3D2>I want to check WMI Connection to all = PCs in my=20 domain. Script code is as following:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2>For Each strComputer in = arrComputers</FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2>&nbsp;&nbsp;&nbsp; Set = objWMIService=20 =3D GetObject("winmgmts:\\" &amp; strComputer &amp;"\root\cimv2")=20 '<STRONG>(*)</STRONG></FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2>&nbsp;&nbsp;&nbsp; If = Err.Number &gt;=20 0 Then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WScript.Echo strComputer = &amp; "=20 - Unable to connect to WMI.&nbsp;Error&nbsp;" &amp; Err.Number &amp; "-" = &amp;=20 Err.Description<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20 Err.Clear<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;=20 WScript.Echo strComputer &amp; "Connect to WMI: = OK!"<BR>&nbsp;&nbsp;&nbsp; End=20 If</FONT></DIV> <DIV><FONT face=3DArial color=3D#ff0000 size=3D2>Next</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>WMI, DCOM, COM+&nbsp;services = are&nbsp;running well=20 in all PCs. Domain Group Policy forces Windows Firewall in all PCs to = open port=20 135 &amp; 445.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>There're times that WMI Connection = to&nbsp;some PCs=20 cannot be successful because Domain Group Policy are not applied at the = PCs. So=20 when the script runs, it stops at line (*) about 1 hour (If you choose=20 Properties at WMI Control in Computer Management, you will have to wait=20 a&nbsp;long time).</FONT></DIV> <DIV><FONT face=3DArial size=3D2>This issue occurs in all Wins XP SP2 = &amp; Wins 2K=20 SP4.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>This issue can be solved by running = command=20 "gpupdate /force" OR "secedit /refreshpolicy ..."</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I want to&nbsp;decrease time to = wait&nbsp;PCs' WMI=20 unconnectable. I want to know&nbsp;whether a PC&nbsp;is connectable or = not=20 immediately. There is any way?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Thanks</FONT>&l