Overview. Program Start VB SCRIPT SIGNER. IT Services

Similar documents
Microsoft System Center Configuration Manager Dell Factory Integration

Associating Run As Accounts in Operations Manager 2007

Microsoft System Center Configuration Manager 2012 Dell Factory Integration

The name of this chapter is Dealing with Devices, but of

Deploying Dell Open Manage Server Administrator from IT Assistant 7.0

Disables all services configured as manual start. Among other things, this prevents Power Users from being able to start these services.

PrimalScript. Your First 20 Minutes. Your First 20 Minutes. Start here to be productive with PrimalScript in just 20 minutes.

Hands-On Lab. Windows Azure Virtual Machine Roles. Lab version: Last updated: 12/14/2010. Page 1

How to Import a Certificate When Using Microsoft Windows OS

Compact Disc 1. Send us your feedback «Previous Next» Microsoft Windows 2000 Scripting Guide

How to detect the CPU and OS Architecture

WMI log collection using a non-admin domain user

Unified Write Filter Configuration

Configuring an IMAP4 or POP3 Journal Account for Microsoft Exchange Server 2003

Direct Certification FTP Setup Instructions

Dell OpenManage Essentials v1.1 Supporting Dell Client Devices

Creating and Reading SecurDisc Discs. SecurDisc - the technology 2

User Agent Preparing the Windows Environment and Installing the User Agent. How-To

Windows 2000 Safe Mode

Dell OpenManage Essentials v2.0 Support for Dell Client Devices

OASYS OASYS WORKSTATION INSTALLATION GUIDE

Oracle Hyperion Financial Data Quality Management, Fusion Edition ERP Source Adapter for SAP. Readme. Purpose. Overview.

Adevice driver is a tiny chunk of programming code that

Browser Cookie Settings

Recommended Settings for Internet Explorer

1. Installing Origin. To install Origin, start the installation program. Click on the Next button.

Putting It All Together: Your First WMI/ADSI Script

User Account Manager

Uploading Files. Creating Files

Working with SQL SERVER EXPRESS

Downloading & Installing Audacity

Print Station. Point-and-Click Printing WHITE PAPER

Python Boot Manager PC Interface for loading Python scripts 30/08/07

Grant Minimum Permission to an Active Directory User Account Used by the Sourcefire User Agent

Password Reset Utility. Configuration

Installing and Activating a Multi-User Network License for Statgraphics 18

Contents. View a test log... 1 Lesson 1: Viewing a test log...1. iii. Lesson 2: Viewing test log events...1 Summary: View a test log...

Tutorial 3 - Performing a Change-Point Analysis in Excel

Nexxis ilab v5.0.7 FIELD FIX INDEX

Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop. Date:Sep. 2011

PrimoPDF Enterprise User Guide, Version 5.0

VIRTUALIZATION MANAGER ENTERPRISE EDITION GETTING STARTED GUIDE. Product: Virtual Iron Virtualization Manager Version: 4.2

From a Household, Client or Account views, under the Actions icon choose Manage Forms to launch, electronically submit and/or upload forms.

4 Working with WSH objects

Web Browser Application Troubleshooting Guide. Table of Contents

OUTLOOK WEB APP (OWA): MAIL

Dealing with Event Viewer

OneDrive for Business Online

BROWSER-BASED SUPPORT CONSOLE USER S GUIDE. 31 January 2017

Manual UCSFwpa Configuration for Windows 7

Internet Explorer/ Edge/ Chrome/ Opera (Windows) Edition

Recertifying a Customized Driver Package (WLK)

29 March 2017 SECURITY SERVER INSTALLATION GUIDE

Parallel Printers Set-Up

Mt. Lebanon School District 7 Horsman Drive Pittsburgh, Pennsylvania

VIRTUALIZATION MANAGER ENTERPRISE EDITION GETTING STARTED GUIDE

Lab - Configure Browser Settings in Windows 8

PST for Outlook Admin Guide

1. TABLE OF CONTENTS. 1. Table of Contents Guide Instructions Access Tririga Reset Your Password... 8

MonitorPack Guard deployment

INF204x Module 2 Lab 2: Using Encrypting File System (EFS) on Windows 10 Clients

VI-CENTER EXTENDED ENTERPRISE EDITION GETTING STARTED GUIDE. Version: 4.5

Office 365. Contents. Features, screen shots, and instructions are subject to change at any time Page 1

Digital Certificate Service (DCS) - User Guide

Digital IDs (E-Signatures) in Adobe Acrobat

VISIONTRACKER FREQUENTLY ASKED QUESTIONS FAQ

Courseworks 10 Network Installation - 1 Seat

TB06-003: Install Procedure for Momentum RIP 7.x & RIP Manager 3.1

Adobe Document Cloud esign Services

CoSign Quick Guide Virtual Signing with CoSign

HOW TO: Establishing a VPN Connection For use with File Sharing on Windows 98, 2000, and Windows XP

How to design and print cards using a database connection with. emedia CS Software

HPE IMC APM IIS Server Application Monitor Configuration Examples

The Retail Agent Portal Experience

Unable to Import into Audatex Estimating

Click Studios. Passwordstate. Remote Session Launcher. Installation Instructions

Firmware zippack name : R exe Firmware File Name : Dell1815dn_V _AutoUpgrade.exe

ACCESS GENERAL QUERIES TECHNICAL ISSUES WITH SPECIFIC COURSES. What do I do if I see Invalid log-in? How do I Access the LMS?

Putting It All Together: Your First WMI/ADSI Script

S/MIME on Good for Enterprise MS Online Certificate Status Protocol. Installation and Configuration Notes. Updated: November 10, 2011

DTSAgent User Documentation

Reset the Admin Password with the ExtraHop Rescue CD

User Manual pdoc Signer

How to Restore Windows Server 2008 Domain Controller System State

Java Trojan UDURRANI UDURRANI

First-Time Login Procedure on XWin32

MyCalyx Getting Started User Guide

Skype for Business. Creating and Joining a Skype for Business Meeting

Quick Reference Guide Hosting WebEx Meetings

8 MANAGING SHARED FOLDERS & DATA

1. Installing Origin. To install Origin, start the installation program. Click on the Next button.

Getting Started with Outlook Web App (OWA)

EDS8/16/32PR Quick Start Guide

Online App Access: Quick Set-up & Instructions

Studywiz Extractor Installation Guide SIMS Multi-School

Status Web Evaluator s Guide Software Pursuits, Inc.

JMP to LSAF Add-in. User Guide v1.1

Deposit Wizard TellerScan Installation Guide

New World ERP-eSuite

Distributed Processing

Transcription:

Overview It is sometimes much easier (and easier to maintain) to use a Visual Basic Script on Windows to perform system functions rather than coding those functions in C++ (WMI is a good example of this). Consequently, there are a number of products that we have developed and maintain that internally use VBS files to perform Windows system functions. We sign all of our products (including VBS scripts) with a DSG VeriSign certificate. If you write scripts that are run on Windows computers you should seriously consider signing those scripts. The VBScript Signing Tool will make this task easier and well as generate C and RealBasic Code for you that you can include in projects that need to run VBS scripts. Program Start When you start the VB Script Signer, you will see the main program window: May 11, 2009 1

As you can see from the screen shot, the tool is very simple, so the best way to explain how it works is to present the information as a step by step tutorial. Step 1 Identify the location of SIGNCODE.EXE Click on the "SignCode.exe Dir" toolbar icon ( contains SIGNCODE.EXE: ) and navigate to the directory that SIGNCODE.EXE is distributed by Microsoft in the.net SDK. Step 2 Identify the location of your VerSign certificate Clicking on the "Cert Dir" ( VeriSign certificate: ) toolbar icon and navigate to the directory that contains your May 11, 2009 2

Step 3 Identify the location of your private key Clicking on the "Private Key Dir" ( your VeriSign certificate: ) toolbar icon and navigate to the directory that contains May 11, 2009 3

Once you have defined all certificate directories the "Save Dirs" toolbar icon will switch from disabled: to enabled:. Now would be a good time to click on the "Save Dirs" icon. The VBS Script Signer will save your preferences to the registry so that the next time you run the VBS Script Signer, the directory entries will be pre populated with your selections: Step 4 Select the VBS script to sign Click on the "VBS Script" toolbar icon ( ) to browse to the VBS script that you want to sign: Once you select a VBS file, the "Action" toolbar icons change from disabled ( ) to enabled ( ). The icons are: May 11, 2009 4

This will create source code that will be displayed in the "Code" text box that you can paste into a C program which will create a text string that you can output to a temporary file, and run. This will create source code that will be displayed in the "Code" text box that you can paste into either a Visual Basic or REALbasic program which will create a text string that you can output to a temporary file, and run. This will display a standard "Save As" dialog box that will allow you to save the signed VBS script. Clicking on any of these icons will launch SIGNCODE.EXE which will present a window where you are prompted to enter your password: Enter your password and click "OK" to sign the VBS file. May 11, 2009 5

Output Details The Sample Input VBS file strcomputer = "." Set objwmiservice = GetObject("winmgmts:\\" & strcomputer & "\root\cimv2") Set colitems = objwmiservice.execquery( _ "SELECT * FROM Win32_BootConfiguration",,48) For Each objitem in colitems Next Wscript.Echo "-----------------------------------" Wscript.Echo "Win32_BootConfiguration instance" Wscript.Echo "-----------------------------------" Wscript.Echo "BootDirectory: " & objitem.bootdirectory The sample script simply displays the Win32 Boot Directory (usually C:\Windows). Generate C Code After the "C Code" toolbar icon is pressed, the code that is created is displayed in the "Code" text box: May 11, 2009 6

You can copy this text to the clipboard and paste it into any C or CPP file. Here is some pseudo code that demonstrates how to use this function: char *scontents = NULL; // Build the VBS file contents scontents = BuildScript(); // Output the contents to a temporary VBS file // Run cscript.exe and pass it the path to the temporary VBS file // Examine the output of the script // Free the contents buffer free(scontents); Generate Basic Code After the "Basic Code" toolbar icon is pressed, the code that is created is displayed in the "Code" text box: May 11, 2009 7

You can copy this text to the clipboard and paste it into any Basic project. Here is some pseudo code that demonstrates how to use this function: dim scontents as string // Build the VBS file contents scontents = BuildScript(); // Output the contents to a temporary VBS file // Run cscript.exe and pass it the path to the temporary VBS file // Examine the output of the script Save the Signed VBS Script to a File After "Save VBS" is clicked and you specify the file path, the VBS Script Signer will save the signed script. Here is what the example input script looks like after signing: strcomputer = "." Set objwmiservice = GetObject("winmgmts:\\" & strcomputer & "\root\cimv2") Set colitems = objwmiservice.execquery( _ "SELECT * FROM Win32_BootConfiguration",,48) For Each objitem in colitems Next Wscript.Echo "-----------------------------------" Wscript.Echo "Win32_BootConfiguration instance" Wscript.Echo "-----------------------------------" Wscript.Echo "BootDirectory: " & objitem.bootdirectory '' SIG '' Begin signature block '' SIG '' MIIVGQYJKoZIhvcNAQcCoIIVCjCCFQYCAQExDjAMBggq '' SIG '' hkig9w0cbquamgygcisgaqqbgjccaqsgwdbwmdigcisg '' SIG '' AQQBgjcCAR4wJAIBAQQQTvApFpkntU2P5azhDxfrqwIB '' SIG '' AAIBAAIBAAIBAAIBADAgMAwGCCqGSIb3DQIFBQAEEATG '' SIG '' Z83JTjbDYwxTZDjzuPKgghECMIIDejCCAmKgAwIBAgIQ '' SIG '' OCXX+vhhr570kOcmtdZa1TANBgkqhkiG9w0BAQUFADBT '' SIG '' MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24s '' SIG '' IEluYy4xKzApBgNVBAMTIlZlcmlTaWduIFRpbWUgU3Rh May 11, 2009 8

'' SIG '' bxbpbmcgu2vydmljzxmgq0ewhhcnmdcwnje1mdawmdaw '' SIG '' WhcNMTIwNjE0MjM1OTU5WjBcMQswCQYDVQQGEwJVUzEX '' SIG '' MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNVBAMT '' SIG '' K1ZlcmlTaWduIFRpbWUgU3RhbXBpbmcgU2VydmljZXMg '' SIG '' U2lnbmVyIC0gRzIwgZ8wDQYJKoZIhvcNAQEBBQADgY0A '' SIG '' MIGJAoGBAMS18lIVvIiGYCkWSlsvS5Frh5HzNVRYNerR '' SIG '' Nl5iTVJRNHHCe2YdicjdKsRqCvY32Zh0kfaSrrC1dpbx '' SIG '' qupjrucuawustksrjo5ysovub+qalpicqljzzulzlcb1 Many more lines follow until '' SIG '' End signature block You can run the script as you would normally (cscript.exe, or wscript). When you right click on the VBS file and choose "Properties you should notice a new tab "Digital Signatures". Selecting the tab will allow you to examine the signing details: May 11, 2009 9

May 11, 2009 10