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 =...
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")...
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 =...
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...
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...
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 =...
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 =...
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...
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...
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...
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.
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...
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 =...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.