Tags » VBScript

Put quotes around ImagePath keys

If the Imagepath key for a service has spaces, it should have quotes around the value to avoid running malicious code.

'Program: Service_ImagePath-Remediate.vbs V2.2.0.0
'Purpose: Enclose all service paths in quotes
' Author: Roger C  10/13/2017
'  Logic: 
'			Populate an array with the services that were identified by Qualys as having spaces without quotes
'			Loop the array, and compare it to the registry 
'			if service is found and the IMAGEPATH matches, enclose the IMAGEPATH value in quotes

option explicit
'===[ Declare variables ]===

'Reqired for advanced logging
Dim LogFileHandle, objFSO, objNetwork, ScriptUser, ScriptComputer
Dim MaxLogFileSize : MaxLogFileSize = 10000
Dim LogFilenamePath : LogFilenamePath = ".\"

Dim i
Const ArrayRows = 48
Dim SvcArray(48,3) 		' == stores the remediation details ==
							' SvcArray(x,1) is the service name
							' SvcArray(x,2) is the original (incorrect) value
							' SvcArray(x,3) is the new (correct) value

Dim objShell ' ==[ initialize the shell object, or error out
on error resume next
Set objShell = CreateObject("wscript.shell")
on error goto 0
If  NOT IsObject(objShell) then
	LogWriteln("Error: unable to create Wscript.shell object. 1,598 more words
Tips And Tricks

Page Object Models(POM) in UFT

In this post, we will create a framework which will implement page object design pattern in UFT.

Setting up page objects will drastically improve test maintenance and will reduce code duplication. 2,028 more words

Unified Functional Testing

PSA: Locating Bad/Corrupt Registry.POL Files

For several months – a good chunk of 2017 in fact – we’ve encountered machines where Group Policy failed as evidenced by the following on affected machines: 774 more words


Get Windows OS Architecture

Function GetOSArchitecture
Set WshShell = CreateObject(“WScript.Shell”)
Set WshProcEnv = WshShell.Environment(“Process”)
process_architecture= WshProcEnv(“PROCESSOR_ARCHITECTURE”)
If process_architecture = “x86” Then
system_architecture= WshProcEnv(“PROCESSOR_ARCHITEW6432”)
If system_architecture = “” Then
system_architecture = “86” 24 more words


UFT Jenkins Integration training

UFT Jenkins Integration training

HPE UFT is leading software testing tool which can be used for automating any windows or the web based applications and Jenkins is a leading CI tool. 179 more words

Unified Functional Testing

Compliance setting to copy DSNs into place

This compliance setting copies all the .REG files from a network folder into the local registry, effectively creating DSNs. It only makes the DSN if it can verify that the driver is installed. 513 more words


Copy files to a workstation using a compliance setting

There’s more than 1 way to solve a problem, and this is a perfect example.
The issue at hand: we want to distribute a common set of files to all workstations, and make sure they always have the latest version. 495 more words

Tips And Tricks