Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mefanning

    Problem with MD5 Script

    Just fixed the service provider to use SHA1...I've tried the different hash service providers and the output is never correct when I compare using a tool like HashCalc to calculate the SHA1 or MD5 hash. Function SHA1(s) Dim asc, enc, bytes, outstr, pos Set asc =...
  2. mefanning

    Problem with MD5 Script

    I'm working on this function, but the output is always an incorrect hash. Any ideas? Thanks. Function SHA1(s) Dim asc, enc, bytes, outstr, pos Set asc = CreateObject("System.Text.UTF8Encoding") Set enc = CreateObject("System.Security.Cryptography.MD5CryptoServiceProvider")...
  3. mefanning

    Remove Hyphens from output

    I have a script that pulls the SHA1 hash off a file and sends the output to a logfile. Currently the output separates includes hyphens. I'm curious if I can edit the output as it is written to remove the hyphens, or if I need edit the logfile after it has been written to. $Log =...
  4. mefanning

    Getting a process path and show modules loaded by a process

    Ah, property is executable path. Any ideas on how to list the loaded modules? Modified code: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colProcess = objWMIService.ExecQuery _ ("Select * from...
  5. mefanning

    Getting a process path and show modules loaded by a process

    I have two objectives with this vbscript that I am having trouble with. 1. I can get a list of running processes, but I cannot get the process path. 2. I would like to also see all of the modules loaded by a process. I can achieve this very easily with powershell, but I'm having trouble with...
  6. mefanning

    Help with CIM_Datafile query

    OK another question on this script. When I use the full path C:\Windows\SysWOW64\Macromed\Flash, my script works. But when I sub in variables, it fails again with the null message: Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objLogFile =...
  7. mefanning

    Help with CIM_Datafile query

    Fixed it. If anyone is curious. Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objLogFile = objFSO.OpenTextFile("c:\Temp\Flash.csv", _ ForAppending, True) Set WshShell = CreateObject("Wscript.Shell") strComputer = "." Set objWMIService =...
  8. mefanning

    Help with CIM_Datafile query

    I'm putting a script together to query the flash install directory and log any ocx file and its file type. When I execute it I get an error: flash.vbs(12, 1) (null): 0x80041017 Any help is appreciated. Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") Set...
  9. mefanning

    Outlook 2003 Form - Copy text from text box to the message body

    Thanks for the quick reply. I believe Item is predefined by Outlook in their scripting editor. If I remove the lines to set strText and to populate item.body it works. This is what I mean: Sub CommandButton1_Click Item.To = "email@email.com" Item.Subject = "This is the subject" Item.Body...
  10. mefanning

    Outlook 2003 Form - Copy text from text box to the message body

    Actually, the error message is - object required Item.UserProperties(...)
  11. mefanning

    Outlook 2003 Form - Copy text from text box to the message body

    My text box is named textbox1 and the value name is "text". I get an error message - One or more parameter values are not valid. Sub CommandButton1_Click Dim strText set strText = Item.UserProperties("TextBox1") Item.To = "email@email.com" Item.Subject = "This is the subject" Item.Body...
  12. mefanning

    Stop Service, Copy File, Start Service

    Thanks everyone. It appears the underlying issue was my pause not long enough for the service to complete stopping. Once I increased to 20000 everything works.
  13. mefanning

    Stop Service, Copy File, Start Service

    Hello, I am attempting to use VBScript to import a list of servers, stop a service, copy a replacement exe, then restart the service. I am almost there, however the service is failing to restart once the file is copied. Any help is appreciated. On Error Resume Next Const ForAppending = 8...
  14. mefanning

    Assistance with vbscript to query services for service account

    Got it... On Error Resume Next Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objLogFile = objFSO.OpenTextFile("c:\service_list.csv", _ ForAppending, True) Set objTextFile = objFSO.OpenTextFile("C:\list.txt",1) 'objLogFile.Write _ ' ("System...
  15. mefanning

    Assistance with vbscript to query services for service account

    Ok, so I am now attempting to modify the script to pick out key words in the service name as recommended by geates. I've added the If/End if, but it fails to retrieve any information. I don't get any errors, however. -------On Error Resume Next Const ForAppending = 8 Set objFSO =...
  16. mefanning

    Assistance with vbscript to query services for service account

    Voila, that did it. thank you PH
  17. mefanning

    Assistance with vbscript to query services for service account

    Geates, Thank you. I tried to fix number 1, but it appears to continually loop in objLogFile.Write(objService.SystemName) & "," objLogFile.Write(objService.Name) & "," objLogFile.Write(objService.StartName) & " What I get is writing continually - SERVER,Alerter,NT...
  18. mefanning

    Assistance with vbscript to query services for service account

    Correction, I would like the script to poll a list of servers, not services... Thank you.
  19. mefanning

    Assistance with vbscript to query services for service account

    I have created a script to query services to retrieve their service account information. To begin, I execute the script locally and it does retrieve the correct information. However, I would like to modify the script to poll a list of services for their service account info and write the...

Part and Inventory Search

Back
Top