.count

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
        • Searching Multiple Domains for Users Hi! I have been tasked with searching for users across multiple domains to get the login name & the domain they are in. I have only been provided a list of display names. I created the following code which works great except that it does not work on any other domain except the one that I am a member of. E.G. I can find the users in Domain1 but I get no results for Domain2 or Domain3 -- Any ideas why? Thanks in advance! Joseph '============================================== 'On Error Resume Next Dim selList, userList, arrUsers, strUser, strQuery_ Domain1, strQuery_ Domain2, strQuery_ Domain3 Dim wshShell, objCSV, objFSO, objDialog, objTextStream, objUser Dim objCommand, objConnection, objRecordSet Set wshShell = WScript.CreateObject("WScript.Shell") Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Set objCSV = objFSO.CreateTextFile(WSHShell.SpecialFolders("Desktop") & "\SearchResults.csv", True) Set objDialog = CreateObject("UserAccounts.CommonDialog") objDialog.Filter = "All Files|*.*" objDialog.FilterIndex = 1 selList = objDialog.ShowOpen userList = objDialog.FileName Set objTextStream = objFSO.OpenTextFile(userList, 1) arrUsers = Split(objTextStream.ReadAll, vbCrLf) objTextStream.Close Set objCommand = WScript.CreateObject("ADODB.Command") Set objConnection = WScript.CreateObject("ADODB.Connection") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" objCommand.ActiveConnection = objConnection objCommand.Properties("Page Size") = 100 objCommand.Properties("Timeout") = 30 objCommand.Properties("Cache Results") = False For Each strUser In arrUsers strQuery_Domain1 = "<LDAP://DC=Domain1,DC=us,DC=domain,DC=com>;(&(objectCategory=person)(objectClass=user)(displayName=" & strUser & "));givenName,sn,displayName,sAMAccountName;subtree" strQuery_Domain2 = "<LDAP://DC=Domain2,DC=us,DC=domain,DC=com>;(&(objectCategory=person)(objectClass=user)(displayName=" & strUser & "));givenName,sn,displayName,sAMAccountName;subtree" strQuery_Domain3 = "<LDAP://DC=Domain3,DC=us,DC=domain,DC=com>;(&(objectCategory=person)(objectClass=user)(displayName=" & strUser & "));givenName,sn,displayName,sAMAccountName;subtree" objCommand.CommandText = strQuery_ Domain1 Set objRecordSet = objCommand.Execute Do Until objRecordSet.EOF objCSV.WriteLine """" & strUser & """,""" & objRecordSet.Fields("displayName") & """," & objRecordSet.Fields("sAMAccountName") & ",Domain1" objRecordSet.MoveNext Loop objCommand.CommandText = strQuery_ Domain2 Set objRecordSet = objCommand.Execute Do Until objRecordSet.EOF objCSV.WriteLine """" & strUser & """,""" & objRecordSet.Fields("displayName") & """," & objRecordSet.Fields("sAMAccountName") & ",Domain2" objRecordSet.MoveNext Loop objCommand.CommandText = strQuery_ Domain3 Set objRecordSet = objCommand.Execute Do Until objRecordSet.EOF objCSV.WriteLine """" & strUser & """,""" & objRecordSet.Fields("displayName") & """," & objRecordSet.Fields("sAMAccountName") & ",Domain3" objRecordSet.MoveNext Loop Next objCSV.Close WScript.Echo "Script Completed" Tag: .count Tag: 181921
      • 2
        • OpenTextFile Error I am one of the scripting disadvantaged. I have copied the following code from a MS KB 835991 article. It is supposed to import SID information into a text document. I copied and pasted the code into a vbs file and it errors on the sixth line. I get an invalid procedure call or argument error for this line. Any help would be appreciated. The code is as follows. Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Active Directory Migration Tool\Protar.mdb" Set rs= CreateObject("ADODB.RecordSet") Set rs = objConnection.Execute ("Select * FROM [MigratedObjects]") Set fso = CreateObject("Scripting.FileSystemObject") Set fo = fso.OpenTextFile("sidMapping.txt", ForWriting, TRUE) Do while not rs.EOF fo.write rs("SourceDomainSid") & "-" & rs("SourceRid") & "," & rs("TargetDomain") & "\" & rs("TargetSamName") & vbcrlf rs.MoveNext loop Tag: .count Tag: 181916
      • 3
        • Thanks That does work. How hard is it to display the countdown in seconds? I am using this to warn users of an scheduled forced logoff. I am using psshutdown which is freeware and does not have a warning message. I need to be able to schedule the logoff in the evenings before backup. Thanks for your help on this! Tag: .count Tag: 181902
      • 4
        • Read NTBackup Log with VBScript. Hi, I'm trying to read a logfile from NTBackup (Server 2003) using the OpenTextFile and ReadLine methods. However, the file seems to be in some kind of unicode encoding and VBScript doesn't read it properly. I've tried using all three TriState modes in the OpenTextFile method, but they just read in garbage, not the actual content of the log. This is really stumping me, so any help would be appreciated. Thanks Mick Tag: .count Tag: 181897
      • 5
        • Convert GBs to Bytes Hi all, Need a function that will convert GBs to Bytes (i.e. 3.14 GB = 3368383278 Bytes. Any one have a code snippet for this? Thanks. -Martin Tag: .count Tag: 181896
      • 6
        • Auto DL a file with ssl Hello I am attempting to create a script that I can run on a periodic basis that downloads a file over HTTPS. I have a VB script that work fine until I point it to the secure server. I can schedule the script to run and it works great until I apply SSL. I get "A security problem occurred" with msxml3.dll The reason we are using HTTPS for the file download is: 1. It is free (we cannot purchase anything just yet) 2. FTP is not secure Any help is appreciated Thanks Tag: .count Tag: 181892
      • 7
        • Simply Script Hello I want to write a simple script that I can schedule with task manager to run. I want the script to display a dialog box with set message and countdown a preset number of seconds and then close. Can anyone help with this? Thanks in advance! Tag: .count Tag: 181891
      • 8
        • Capturing Internet Explorer Script Error messages I would like to capture the error message that appears in the Internet Explorer Script Error window that when my script fails in HTA. I've tried using err.number and err.description but it doesn't give me the same level of detail. Does anyone know how to do this? Thanks, Steve Tag: .count Tag: 181890
      • 9
        • Function using exceptions to capitalize first letter of each word Does anyone have any suggestions on how to make the following function do the followign: 1. Capitalize every word except those in an exceptions list. 2. Always capitalize the first letter of the first word. Thanks! <% Function TitleCase(strTemp) Dim intFound Dim strTempName Do strTempName = strTempName & UCase(Left(strTemp, 1)) strTemp = Right(strTemp, Len(strTemp) - 1) intFound = InStr(strtemp, " ") If intFound <> 0 Then strTempName = strTempName & Left(strTemp, intFound) strTemp = Right(strTemp, Len(strTemp) - intFound) Else strTempName = strTempName & strTemp Exit Do End If Loop While intFound <> 0 Response.Write strTempName End Function %> Tag: .count Tag: 181888
      • 10
        • how to center an ie pop window hi How do a center an IE window so it well be centered regardless of the screen resulutions if a use the code below i can center the window so it will work on a specfic resulution, but i want it to be center regardless of the reslolution. With IE .left=155 .top=70 .height=635 .width=740 any ideas ? Thanks /Pe Tag: .count Tag: 181887
      • 11
        • Scheduled Task Time Limit Hi, I need to schedule a number of tasks on 100+ servers. The WMI class Win32_ScheduledJob appears to do what I need, but I can't work out how to set a time limit on a recurring task (the jobs need to run for a variety of different time limits, so setting the global default wouldn't do it) I've found an article on the MS site suggesting that this class supports that functionality (as oppose to the command line which doesn't) but the closest function listed is "UntilTime" and as far as I can work out, it can only be used with absolute dates which wouldn't be much help for a recurring job. Tag: .count Tag: 181886
      • 12
        • Scripting the Add Network Place Wizard? There has been many post about the "Add Network Place Wizard" and how one can script shortcuts into the "My Network Places" folder like the wizard does, but I have not yet found the post that solves my problem. I need to script the creation of folder shortcuts in the "My Network Places" folder. The following code almost works... But there is a Big BUT! '****** START OF SAMPLE ****** Const NETHOOD = &H13& Dim oWSHShell As WshShell Dim oShell As Shell32.Shell Dim oFolder As Shell32.Folder Dim oFolderItem As Shell32.FolderItem Dim oShortcut As Object Set oWSHShell = New WshShell Set oShell = New Shell32.Shell Set oFolder = oShell.Namespace(NETHOOD) Set oFolderItem = oFolder.Self Set oShortcut = oWSHShell.CreateShortcut(oFolderItem.Path & "\" & "Shortcut Name" & ".lnk") oShortcut.TargetPath = "http://MyServer/MyFolder/" oShortcut.Description = "This is the comment for the folder shortcut" oShortcut.Save '****** END OF SAMPLE ****** The But here is that this creates a shortcut object, you can tell this because doing a right-click properties shows three tabs with the Find Target, Change Icon and Advanced buttons, like you see on all shortcuts. Had I used the "Add Network Place Wizard" I would have got a folder shortcut which appears to be an entirely different beast. And you can confirm its different by doing a right-click properties, this time you'll see a single tab and on this tab page it states this is a Type: Folder. By creating shortcuts with the above code we are unable to navigate to these locations because the targets start with http:, when clicked the folder is opened in IE instead of using explorer to navigate to the target. The reason they start with http: is to do with web folders and WebDAV on our network. What I need to do is create folder shortcuts just like those produced by the "Add Network Place Wizard". What API's do I need to call, or changes to the script above do I need to create folder shortcuts and not shortcuts to folders? Any assistance gratefully received. Cheers Steve Le Monnier Tag: .count Tag: 181884
      • 13
        • backup of virtual machines let me preface this by saying that I am not very good at vb. I am using a script that backs up virtual machines and can't get it to back up the vhd file (virtual hard drive) It should work but not sure why it doesn't, can someone take a look at the following and let me know if it it looks good or not??? If Result = 0 then 'Loop through all vm machines For each objVM in virtualServer.VirtualMachines 'See if vm machine is running. If so copy shadow backup of vm disk drives If objVM.State = 5 then 'Copy virtual hard disks and undo disks For each vhd in objVM.HardDiskConnections MyArray = Split(vhd.undoHardDisk.file,"\") Filename = MyArray(Ubound(MyArray)) SourceName = "x" & Right(vhd.undoHardDisk.file,Len(vhd.undoHardDisk.file)-1) wscript.echo vhd.undoHardDisk.file wscript.echo SourceName objFSO.CopyFile SourceName,DestBackupDir & Filename MyArray = Split(vhd.HardDisk.file,"\") Filename = MyArray(Ubound(MyArray)) SourceName = "x" & Right(vhd.HardDisk.file,Len(vhd.HardDisk.file)-1) objFSO.CopyFile SourceName,DestBackupDir & Filename Next End If Next End If Tag: .count Tag: 181881
      • 14
        • Type mismatch error in when accessing an array Hello, I have a method on a com+ object that is returning an array of objects. I know the array is popluated as calls to check the ubound and lbound show valid values. However, any calls to get the value of a cell in the array results in a type mismatch error. Microsoft VBScript runtime (0x800A000D) Type mismatch /idmTest/userTest.asp, line 30 I have pasted below some of the samples that i have tried. Each results in the error above. Any suggestions on how I can access this object would be helpful. ' Call to get the array and to validate that it is an array. Set userObj = Server.CreateObject("idmVBApi.ComUser") userGrpAry = userObj.getUserGroups(5790) arySize = ubound(userGrpAry) response.write "userGrpAry size = " & lbound(userGrpAry) & " - " & arySize & "<br>" response.write "userGrpAry type isArray = " & isArray(userGrpAry) & "<br>" ' the following fails dim index for index = lbound(userGrpAry) to ubound(userGrpAry) response.Write "type = " & isobject(userGrpAry(index)) response.write userGrpAry(index).grpName next Calls to isNull(userGrpAry(index)) also fail. Regards Leslie Tag: .count Tag: 181877
      • 15
        • Create printers on Windows Storager Server 2003?? Hi there I have a script which should create 209 printers, based on information read from a CSV file. Everything works 100% on my Windows XP Workstation, but when I try to run it on my HP NAS2000s server running Windows Storage Server 2003 (similar to normal Windows Server 2003), I get an error with the following command: objNewPort.Put_ Here is my code: Const ForReading = 1 strComputer = "." Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("\\fp1\public\william\printers.csv", ForReading) Do While objTextFile.AtEndOfStream <> True objTextFile.Skipline 'Skip the heading arrPrinterDetails = Split(objTextFile.Readline, ",") '0-Name,1-Comment,2-DriverName,3-Location,4-PortName,5-ShareName,6-Duplex,7-Orientation,8-PaperSize strName = arrPrinterDetails(0) strPortName = arrPrinterDetails(4) strLocation = arrPrinterDetails(3) strDriverName = arrPrinterDetails(2) strShareName = arrPrinterDetails(5) WScript.Echo strName strDriverName = "Generic / Text Only" Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = strPortName objNewPort.Protocol = 1 objNewPort.HostAddress = strPortName objNewPort.PortNumber = "9999" objNewPort.SNMPEnabled = False objNewPort.Put_ Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_ objPrinter.DriverName = strDriverName objPrinter.PortName = strPortName objPrinter.DeviceID = strName objPrinter.Location = strLocation objPrinter.Network = True objPrinter.Shared = True objPrinter.ShareName = strShareName objPrinter.Put_LoopobjTextFile.Close Tag: .count Tag: 181875
      • 16
        • Help: Return value of IE button clicked I am using GUIMENU.vbs as a basis for a script I am writing. I am having a problem getting the follwoing portion of the code to work: 'build HTML page based on menu items For nF = 0 To Ubound(arrArguments) objDoc.Write "<center><input type=""button"" value=""" & arrArguments(nF) & """ name=""" & nF & """></p></center>" objDoc.All(Cstr(nF)).onclick = GetRef("OnButton_Click") Next 'this subroutine is called when a menu button is clicked Sub OnButton_Click nReturnValue = objdoc.activeelement.name bDone = True End Sub The menu is created correctly, however I have been unsuccesful in returning the vlaue of the option selected. My menu consists of two named buttons, One & Two. I need the code to return the name of the button selected. The above excerpt is verbatiam from the google source. Tag: .count Tag: 181874
      • 17
        • Sharing userfolder with vbscript Hi, I've created a procedure for automating user creation in my network: 1. I have a short script defining username etc. and adding group membership. 2. Then, logging in for the first time, the user home folder is automaticly created using the Folder Redirection function in Group Policy. 3. My challenge now is to set the share afterwards, for instance via the loginscript at first user login. I've gotten this far with the script: Const FILE_SHARE = 0 strComputer = "myserver" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & struser & "\root\cimv2") Set objNewShare = objWMIService.Get("Win32_Share") errReturn = objNewShare.Create _ ("h:\users\myuser", "myuser", FILE_SHARE) Wscript.Echo errReturn However, this requires me to edit in the username in each instance -for each user- making it useless for my login procedure. I would like to use the %username% env ariable, as the variable is set as soon as the user logs in, but then the script failed with error 24 (path not found). Does the WMI service ignore it? If anyone has an idea how to get this to work I'd be forever greatful. Regards... Tag: .count Tag: 181870
      • 18
        • Member Servers [WILDPACKET] I want to find out how many Member Servers we have on our Network in house and remote sites. This is all one domain with multiple sites and we we have 100 servers. What will be the quickest way to collect this information? Unluckily, nobody documented this when the servers intially got deployed. Any script? Thank you in advance. Tag: .count Tag: 181869
      • 19
        • Error Handling... I was slapped in the face by irony today. See, for the life of me, I can't seem to find any documentation on Error Handling for VBScript. For instance, in the following line of code: set objFs = GetObject("WinNT://" & strServer & "/LanmanServer,FileService") If strServer, a user defined string gathered from a dialog box, does not equate to a resolvable machine name - the script reports an error, but attempts to continue. Strangely enough, the VBScript documentation for the GetObject() function does not discuss possible errors, or how to handle them! After banging my head trying to figure out what the function returns on failure (I can't seem to get MS Script Debugger to work on VBScripts) I finally threw my hands up and said, "forget it, the error can stay" and this, I think, is how bugs find their way into MS products. For a moment I actually felt like a Microsoft employee must feel! :) Anyways, my question is, how do you handle Exceptions in VBScript? I know Python is: try: ... except: ... and Java is: try { ... } catch(Exception e) { ... } Any help would be appreciated! -Tim Tag: .count Tag: 181865
      • 20
        • List and remap shares Well, batch has failed me, Perl will work but the users don't have it installed. So my next step is vbscript, but I don't see it done. What I need to do: First: prompt a user for his userid and password assigned to him for a remote file server. Second: Given a few alternative names for the server, get a list of all drive letters mapped to network shares on a server and the share they point to. For example, for ServerX.saplings.us they may have x: \\serverx.saplings.us\sharex y: \\serverx\sharey w: \\127.0.0.1\sharew They could be using a short name, the full name, or the ip address. So I will hardcode all 3 values in my script. Thirdly, go through and disconnect all those shares. Lastly, go through and reconnect each share, but this time use the server name I designate(so I can get them all pointing to the same name) and the userid and password he specified(so we can avoid having a bad password stored with one of those shares, technically not possible but it seems it is anyway) I checked the script repository and didn't see anything, so figured I'd post here before hacking on it myself. Tag: .count Tag: 181861
      • 21
        • extracting text from a .htm document I am a very experienced user of VBA but I know virtually nothing of windows programming or file scripting (although I do understand the basic filesystemobject commands). I'm using the help files in VBA for OpenAsTextStream, but it isn't working. I have over 500 .htm files from which I would like to extract the text either into text files or into string variables so that I can do further processing. This will save me the trouble of having to open each of the htm files and save each as a text file manually. [Note that if there is a better way to accomplish the above than the OpenAsTextStream method, PLEASE let me know. ] But when I try to use OpenAsTextStream, my problem is that I try to use the following code from the VBA help file to extract the text and put the text into a text file, but I get an error: Dim f, fs, g, h, ts, j Dim str2 As String Const ForReading = 1, ForWriting = 2, ForAppending = 3 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0 Set fs = CreateObject("Scripting.FileSystemObject") fs.CreateTextFile "c:\testfile.txt" Set f = fs.getfile("c:\testfile.txt") Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault) str2 = "\\OurNetworkedDell\C\MyMainFolder\ASpecificFile.htm" Set g = fs.getfile(str2) Set h = g.OpenAsTextStream(ForReading, TristateUseDefault) j = h.readall [this command gives an error] How do I get from the command OpenAsTextStream to extract the text in g and "write" it into f which is the text file "c:\testfile.txt" Thank you!!!!! Tag: .count Tag: 181860
      • 22
        • connection to ad Hi, how can I connect to AD when I just have a domain and a user id? Up to now I have just found examples where everything is known, like cn, dn, etc. But as I just mentioned I just know the domain and a user id. With RootDSE and DefaultNamingContext I can find out the full domain, but it seems that I have to know cn, too (and in some examples I can provide a ldap server name. So I'm a bit confused how to correctly connect to AD). Can anybody give me a hint on that, or recommend me a goog tutorial (I haven't found anything really explaining on that at msdn or google, as most examples are for asp.net and I have to use vbscript) Thanks in advance. Best regards, Andi Tag: .count Tag: 181857
      • 23
        • Registry error Hello, I have an Access database on a website, records of which display in a table in an .asp page. I have a form to add records that works fine, both on my localhost and on the ISP's server. However, I have this .asp page to display database records from which to choose one to update. It replaces the "ID" field with a radio button, which when selected takes the user to another form to amend the record. ------------------------------------------------------------------------ <% Dim Conn, Rs, sql Set Conn = Server.CreateObject("ADODB.Connection") Set Rs = Server.CreateObject("ADODB.Recordset") Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("results.mdb") sql= "SELECT * FROM tbl2005 order by date1;" Rs.Open sql, Conn Response.Write "<FORM name='Update' method='post' action='update_form.asp'>" Response.Write "<table border=0 cellspacing=1 cellpadding=1 bgcolor=white>" Response.Write "<tr>"&"<th colspan='2' align='left' bgcolor=#dec45a>"&"Date"&"</th>"&"<th bgcolor=#dec45a>"&"Day"&"</th>"&"<th bgcolor=#b0e0e6>"&"Event"&"</th>"&"<th bgcolor=#9fcf8b>"&"A Grade"&"</th>"&"<th bgcolor=#a0a0a4>"&"B Grade"&"</th>"&"<th bgcolor=#8ac5ff>"&"C Grade"&"</th>"&"<th bgcolor=#dec45a>"&"NTP"&"</th>"&"</tr>" if NOT Rs.EOF then Do While not Rs.EOF Response.Write ("<tr>") Response.Write ("<td bgcolor=#ffffbf>"&"<input type='radio' name='ID' value="&Rs("ID")&">"&"</td>") Response.Write ("<td bgcolor=#ffffbf>"&Rs("date1")&"</td>") Response.Write ("<td bgcolor=#ffffbf>"&Rs("day")&"</td>") Response.Write ("<td bgcolor=#ddf4ff>"&Rs("event1")&"</td>") Response.Write ("<td bgcolor=#cce6cd>"&Rs("Agrade")&"</td>") Response.Write ("<td bgcolor=#f0f0f0>"&Rs("Bgrade")&"</td>") Response.Write ("<td bgcolor=#bbe9ff>"&Rs("Cgrade")&"</td>") Response.Write ("<td bgcolor=#ffffbf>"&Rs("NTP")&"</td>") Response.Write ("</tr>") Rs.MoveNext Loop else Response.Write("No records found") end if Response.Write("<tr>"&"<td colspan='3' align='left'>"&"<input type ='submit' name='submit' value='Select competition' >"&"</td>"&"</tr>") Response.Write "</table>" Rs.Close Set Rs = Nothing Set Conn = Nothing %> ------------------------------------------------------------------------- This script works OK on my localhost, but when I try it on my ISP's server, it gives the following error message: "Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x9cc Thread 0x740 DBC 0x9e5ce3c Jet'. select_update.asp, line 25" Is there a problem with the vbscript (something I can alter to fix), or is this a problem with the ISP's server and registry access? -- Cheers Colin Wilson ------------------------------------------------------------------ Trentham Golf Club: http://www.trenthamgolf.com ------------------------------------------------------------------ Tag: .count Tag: 181854
      • 24
        • 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: .count Tag: 181853
      • 25
        • 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: .count Tag: 181848
    • Next
      • 1
        • 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: .count Tag: 181845
      • 2
        • 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: .count Tag: 181844
      • 3
        • 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: .count Tag: 181842
      • 4
        • 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: .count Tag: 181840
      • 5
        • 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: .count Tag: 181838
      • 6
        • 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: .count Tag: 181837
      • 7
        • 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: .count Tag: 181826
      • 8
        • 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: .count Tag: 181823
      • 9
        • 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: .count Tag: 181821
      • 10
        • 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: .count Tag: 181819
      • 11
        • 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: .count Tag: 181818
      • 12
        • 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: .count Tag: 181816
      • 13
        • 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: .count Tag: 181815
      • 14
        • 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: .count Tag: 181809
      • 15
        • 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: .count Tag: 181807
      • 16
        • 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: .count Tag: 181806
      • 17
        • 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 lik