<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6308291653745450993</id><updated>2012-02-16T11:43:59.987-08:00</updated><title type='text'>VBScript</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-8684657832194735411</id><published>2008-01-24T16:32:00.000-08:00</published><updated>2008-01-24T16:47:37.622-08:00</updated><title type='text'>Scriptomatic 2.0</title><content type='html'>The Scriptomatic 2.0 is great tool that you can use to assist you in developing WMI Scripts. To download Scriptomatic 2.0, click &lt;a href="http://www.microsoft.com/technet/scriptcenter/tools/scripto2.mspx" target="_blank"&gt;here &lt;/a&gt;to go to Microsoft's Web site. This tool makes it really easy to write WMI queries.&lt;br /&gt;&lt;br /&gt;For example, here is a WMI query that will display your processor information in a text file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Const wbemFlagReturnImmediately = &amp;amp;h10&lt;br /&gt;Const wbemFlagForwardOnly = &amp;amp;h20&lt;br /&gt;&lt;br /&gt;arrComputers = Array(".")&lt;br /&gt;For Each strComputer In arrComputers&lt;br /&gt;   WScript.Echo&lt;br /&gt;   WScript.Echo "=========================================="&lt;br /&gt;   WScript.Echo "Computer: " &amp;amp; strComputer&lt;br /&gt;   WScript.Echo "=========================================="&lt;br /&gt;&lt;br /&gt;   Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer &amp;amp; "\root\CIMV2")&lt;br /&gt;   Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", _&lt;br /&gt;                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)&lt;br /&gt;&lt;br /&gt;   For Each objItem In colItems&lt;br /&gt;      WScript.Echo "AddressWidth: " &amp;amp; objItem.AddressWidth&lt;br /&gt;      WScript.Echo "Architecture: " &amp;amp; objItem.Architecture&lt;br /&gt;      WScript.Echo "Availability: " &amp;amp; objItem.Availability&lt;br /&gt;      WScript.Echo "Caption: " &amp;amp; objItem.Caption&lt;br /&gt;      WScript.Echo "ConfigManagerErrorCode: " &amp;amp; objItem.ConfigManagerErrorCode&lt;br /&gt;      WScript.Echo "ConfigManagerUserConfig: " &amp;amp; objItem.ConfigManagerUserConfig&lt;br /&gt;      WScript.Echo "CpuStatus: " &amp;amp; objItem.CpuStatus&lt;br /&gt;      WScript.Echo "CreationClassName: " &amp;amp; objItem.CreationClassName&lt;br /&gt;      WScript.Echo "CurrentClockSpeed: " &amp;amp; objItem.CurrentClockSpeed&lt;br /&gt;      WScript.Echo "CurrentVoltage: " &amp;amp; objItem.CurrentVoltage&lt;br /&gt;      WScript.Echo "DataWidth: " &amp;amp; objItem.DataWidth&lt;br /&gt;      WScript.Echo "Description: " &amp;amp; objItem.Description&lt;br /&gt;      WScript.Echo "DeviceID: " &amp;amp; objItem.DeviceID&lt;br /&gt;      WScript.Echo "ErrorCleared: " &amp;amp; objItem.ErrorCleared&lt;br /&gt;      WScript.Echo "ErrorDescription: " &amp;amp; objItem.ErrorDescription&lt;br /&gt;      WScript.Echo "ExtClock: " &amp;amp; objItem.ExtClock&lt;br /&gt;      WScript.Echo "Family: " &amp;amp; objItem.Family&lt;br /&gt;      WScript.Echo "InstallDate: " &amp;amp; WMIDateStringToDate(objItem.InstallDate)&lt;br /&gt;      WScript.Echo "L2CacheSize: " &amp;amp; objItem.L2CacheSize&lt;br /&gt;      WScript.Echo "L2CacheSpeed: " &amp;amp; objItem.L2CacheSpeed&lt;br /&gt;      WScript.Echo "LastErrorCode: " &amp;amp; objItem.LastErrorCode&lt;br /&gt;      WScript.Echo "Level: " &amp;amp; objItem.Level&lt;br /&gt;      WScript.Echo "LoadPercentage: " &amp;amp; objItem.LoadPercentage&lt;br /&gt;      WScript.Echo "Manufacturer: " &amp;amp; objItem.Manufacturer&lt;br /&gt;      WScript.Echo "MaxClockSpeed: " &amp;amp; objItem.MaxClockSpeed&lt;br /&gt;      WScript.Echo "Name: " &amp;amp; objItem.Name&lt;br /&gt;      WScript.Echo "OtherFamilyDescription: " &amp;amp; objItem.OtherFamilyDescription&lt;br /&gt;      WScript.Echo "PNPDeviceID: " &amp;amp; objItem.PNPDeviceID&lt;br /&gt;      strPowerManagementCapabilities = Join(objItem.PowerManagementCapabilities, ",")&lt;br /&gt;         WScript.Echo "PowerManagementCapabilities: " &amp;amp; strPowerManagementCapabilities&lt;br /&gt;      WScript.Echo "PowerManagementSupported: " &amp;amp; objItem.PowerManagementSupported&lt;br /&gt;      WScript.Echo "ProcessorId: " &amp;amp; objItem.ProcessorId&lt;br /&gt;      WScript.Echo "ProcessorType: " &amp;amp; objItem.ProcessorType&lt;br /&gt;      WScript.Echo "Revision: " &amp;amp; objItem.Revision&lt;br /&gt;      WScript.Echo "Role: " &amp;amp; objItem.Role&lt;br /&gt;      WScript.Echo "SocketDesignation: " &amp;amp; objItem.SocketDesignation&lt;br /&gt;      WScript.Echo "Status: " &amp;amp; objItem.Status&lt;br /&gt;      WScript.Echo "StatusInfo: " &amp;amp; objItem.StatusInfo&lt;br /&gt;      WScript.Echo "Stepping: " &amp;amp; objItem.Stepping&lt;br /&gt;      WScript.Echo "SystemCreationClassName: " &amp;amp; objItem.SystemCreationClassName&lt;br /&gt;      WScript.Echo "SystemName: " &amp;amp; objItem.SystemName&lt;br /&gt;      WScript.Echo "UniqueId: " &amp;amp; objItem.UniqueId&lt;br /&gt;      WScript.Echo "UpgradeMethod: " &amp;amp; objItem.UpgradeMethod&lt;br /&gt;      WScript.Echo "Version: " &amp;amp; objItem.Version&lt;br /&gt;      WScript.Echo "VoltageCaps: " &amp;amp; objItem.VoltageCaps&lt;br /&gt;      WScript.Echo&lt;br /&gt;   Next&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function WMIDateStringToDate(dtmDate)&lt;br /&gt;WScript.Echo dtm:&lt;br /&gt;    WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) &amp;amp; "/" &amp;amp; _&lt;br /&gt;    Mid(dtmDate, 7, 2) &amp;amp; "/" &amp;amp; Left(dtmDate, 4) _&lt;br /&gt;    &amp;amp; " " &amp;amp; Mid (dtmDate, 9, 2) &amp;amp; ":" &amp;amp; Mid(dtmDate, 11, 2) &amp;amp; ":" &amp;amp; Mid(dtmDate,13, 2))&lt;br /&gt;End Function&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-8684657832194735411?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/8684657832194735411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=8684657832194735411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8684657832194735411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8684657832194735411'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/scriptomatic-20.html' title='Scriptomatic 2.0'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-8963252095875317736</id><published>2008-01-19T21:39:00.000-08:00</published><updated>2008-01-31T16:11:18.533-08:00</updated><title type='text'>Adding a Printer on a Remote Computer</title><content type='html'>These two scripts will add an IP port and install a printer on a remote machine. This is good to add a local IP printer on a remote workstation. For this script, you need to install prnadmin.dll. The prnadmin.dll file is available in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;amp;DisplayLang=en"&gt;Windows Server 2003 Resource Kit Tools&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Add an IP port:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;'----------------------------&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;'Required files:prnadmin.dll&lt;br /&gt;'prnadmin.dll is available&lt;br /&gt;'in the Windows Resource Kit located&lt;br /&gt;'at http://www.microsoft.com&lt;br /&gt;'----------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;dim oPort&lt;br /&gt;dim oMaster&lt;br /&gt;set oPort = CreateObject("Port.Port.1")&lt;br /&gt;set oMaster = CreateObject("PrintMaster.PrintMaster.1")&lt;br /&gt;Set WshShell = WScript.CreateObject("WScript.Shell")&lt;br /&gt;&lt;br /&gt;'Edit for comouter name&lt;br /&gt;strMachineName = "\\computer"&lt;br /&gt;&lt;br /&gt;'Edit for IP port name&lt;br /&gt;strPortName = "Name of the Port"&lt;br /&gt;&lt;br /&gt;'Edit for IP address&lt;br /&gt;strIPAdress = "Insert Printer IP Address Here"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Indicate where to add the port. Double quotes ("" ) stand for the local computer, which is the default.&lt;br /&gt;oPort.ServerName = strMachineName&lt;br /&gt;&lt;br /&gt;'The name of the port cannot be omitted.&lt;br /&gt;oPort.PortName = strPortName&lt;br /&gt;&lt;br /&gt;'The type of the port can be 1 (TCP RAW), 2 (TCP LPR), or 3 (standard local).&lt;br /&gt;oPort.PortType = 1&lt;br /&gt;&lt;br /&gt;'Mandatory for TCP ports. This is the address of the device to which the port connects.&lt;br /&gt;oPort.HostAddress = strIPAdress&lt;br /&gt;&lt;br /&gt;'For TCP RAW ports. Default is 9100.&lt;br /&gt;oPort.PortNumber = 9100&lt;br /&gt;&lt;br /&gt;'Enable or disable SNMP.&lt;br /&gt;oPort.SNMP = false&lt;br /&gt;&lt;br /&gt;'Applies to TCP LPR name, default is LPR&lt;br /&gt;oPort.QueueName = "Queue"&lt;br /&gt;&lt;br /&gt;'Byte counting or double spool applies to TCP LPR ports, is disabled by default.&lt;br /&gt;oPort.DoubleSpool = false&lt;br /&gt;&lt;br /&gt;'Try adding the port.&lt;br /&gt;oMaster.PortAdd oPort&lt;br /&gt;'Test for the status.&lt;br /&gt;If Err &lt;&gt; 0 then&lt;br /&gt;&lt;br /&gt;'An error occurred.&lt;br /&gt;WshShell.Popup "Error " &amp;amp; Return &amp;amp; " returned during setup.", 10, "Printer port add.", 16&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;WshShell.Popup "IP Port Add Successful", 10, "Install Status", 64&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Add a Printer on a Remote Computer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;'----------------------------&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;'Required files:prnadmin.dll&lt;br /&gt;'prnadmin.dll is available&lt;br /&gt;'in the Windows Resource Kit located&lt;br /&gt;'at http://www.microsoft.com&lt;br /&gt;'----------------------------&lt;br /&gt;&lt;br /&gt;dim oMaster&lt;br /&gt;dim oPrinter&lt;br /&gt;Set WshShell = WScript.CreateObject("WScript.Shell")&lt;br /&gt;set oMaster = CreateObject("PrintMaster.PrintMaster.1")&lt;br /&gt;set oPrinter = CreateObject("Printer.Printer.1")&lt;br /&gt;&lt;br /&gt;'Edit for Computer Name&lt;br /&gt;'name of computer you want to add IP port to&lt;br /&gt;strMachineName = "enter computer name here"&lt;br /&gt;&lt;br /&gt;'Edit for Printer Name. This is the name users will see when selecting this printer&lt;br /&gt;strPrinterName = "printer display name"&lt;br /&gt;&lt;br /&gt;'Edit for Printer Driver Name. This specifies the printer driver to use.&lt;br /&gt;'This must match the print driver name exactly.&lt;br /&gt;'The string is required and cannot be empty.&lt;br /&gt;'Example below is for the HP LaserJet 9040 Post Script&lt;br /&gt;strDriverName = "HP LaserJet 9040 PS"&lt;br /&gt;&lt;br /&gt;'Edit for the IP Port Name&lt;br /&gt;'change aaa.bbb.ccc.ddd with the IP address of the printer&lt;br /&gt;strPortName = "IP_aaa.bbb.ccc.ddd"&lt;br /&gt;&lt;br /&gt;'Edit for the Driver Path.&lt;br /&gt;'Where you unzipped the printer driver files to.&lt;br /&gt;strDriverPath = "\\computer name\share name\"&lt;br /&gt;&lt;br /&gt;'Edit for the INF path. Usually the same as the driver path plus the INF file&lt;br /&gt;'point to where you unzipped the driver files&lt;br /&gt;strINF = "\\computer name\share name\HP LaserJet 9040 PS.inf"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;oPrinter.ServerName  = strMachineName&lt;br /&gt;oPrinter.PrinterName = strPrinterName&lt;br /&gt;oPrinter.DriverName  = strDriverName&lt;br /&gt;oPrinter.PortName    = strPortName&lt;br /&gt;oPrinter.DriverPath  = strDriverPath&lt;br /&gt;oPrinter.InfFile     = strINF&lt;br /&gt;&lt;br /&gt;'The following code adds the printer.&lt;br /&gt;oMaster.PrinterAdd oPrinter&lt;br /&gt;&lt;br /&gt;'The following code uses the Err object to determine whether the printer was added successfully.&lt;br /&gt;if Err &lt;&gt; 0 then&lt;br /&gt;  'An error occurred&lt;br /&gt;WshShell.Popup "Error " &amp;amp; Return &amp;amp; " returned during setup.", 10, "Printer add.", 16&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;WshShell.Popup "Printer Add Successful", 10, "Install Status", 64&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-8963252095875317736?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/8963252095875317736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=8963252095875317736' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8963252095875317736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8963252095875317736'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/adding-printer-on-remote-computer.html' title='Adding a Printer on a Remote Computer'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-8803984774621210776</id><published>2008-01-14T14:14:00.000-08:00</published><updated>2008-01-14T14:23:39.273-08:00</updated><title type='text'>Sending Email from A VBScript</title><content type='html'>You can add this code to your scripts to send an email.&lt;br /&gt;&lt;br /&gt;Dim strComputer, sTextBody, objEmail, strSMTPServer, strFrom, strTo, strSubject, strTextbody&lt;br /&gt;&lt;br /&gt;strSMTPServer = "enter the smtp server here"&lt;br /&gt;strFrom = "enter the from email address here"&lt;br /&gt;strTo = "enter the to email address here"&lt;br /&gt;strSubject = "enter the email subject here"&lt;br /&gt;strTextbody = "enter the body of the email here"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Set objEmail = CreateObject("CDO.Message")&lt;br /&gt; objEmail.From = strFrom&lt;br /&gt; objEmail.To = strTo&lt;br /&gt; objEmail.Subject = strSubject&lt;br /&gt; objEmail.Textbody = strTextbody&lt;br /&gt; objEmail.AddAttachment "to add an attachment to the email, type in the file path"&lt;br /&gt; objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2&lt;br /&gt; objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPServer&lt;br /&gt; objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25&lt;br /&gt; objEmail.Configuration.Fields.Update&lt;br /&gt; objEmail.Send&lt;br /&gt;&lt;br /&gt;Set objEmail = Nothing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-8803984774621210776?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/8803984774621210776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=8803984774621210776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8803984774621210776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/8803984774621210776'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/sending-email-from-vbscript.html' title='Sending Email from A VBScript'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-2265398719017208596</id><published>2008-01-12T18:32:00.000-08:00</published><updated>2008-01-24T16:49:17.683-08:00</updated><title type='text'>Cool Tech Toys, Gadgets, and Apparel</title><content type='html'>&lt;a href="http://www.thinkgeek.com/" target="_blank"&gt;http://www.thinkgeek.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cool toys, gadgets, and apparel for techies.&lt;br /&gt;&lt;br /&gt;My favorite...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.thinkgeek.com/geektoys/rc/934c/" target="_blank"&gt;Palmsize R/C Helicopter&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_bb7yDVF920E/R4l5ckCblRI/AAAAAAAAADI/0wO2i4KqYTk/s1600-h/palmsize_rc_copter_silver.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_bb7yDVF920E/R4l5ckCblRI/AAAAAAAAADI/0wO2i4KqYTk/s320/palmsize_rc_copter_silver.jpg" alt="" id="BLOGGER_PHOTO_ID_5154784780119414034" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-2265398719017208596?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/2265398719017208596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=2265398719017208596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/2265398719017208596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/2265398719017208596'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/cool-tech-toys-gadgets-and-apparel.html' title='Cool Tech Toys, Gadgets, and Apparel'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_bb7yDVF920E/R4l5ckCblRI/AAAAAAAAADI/0wO2i4KqYTk/s72-c/palmsize_rc_copter_silver.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-4548584927402556896</id><published>2008-01-10T15:03:00.000-08:00</published><updated>2008-01-17T15:53:56.670-08:00</updated><title type='text'>Enable or Disable Remote Desktop on Multiple Computers</title><content type='html'>This script will enable or disable Remote Desktop on multiple computers on an IP segment. The first input box asks for the subnet (i.e. 192.168.1). The second input box asks for the lowest  number on the segment that you would like to start with. The third box asks for the highest number on the segment that you want to end with. I would like to add more to this script that will allow it to ping an IP address first. If there is no response it will move on to the next address instead of trying to enable RD on a non-existent PC. I will add that when I have time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;DIM strComputer, strIPInput, strLow, strHigh&lt;br /&gt;On Error Resume Next&lt;br /&gt;Set WshShell = WScript.CreateObject("WScript.Shell")&lt;br /&gt;&lt;br /&gt;'Set to 0 to disable Remote Desktop, set to 1 to enable Remote Desktop&lt;br /&gt;Const ENABLE_CONNECTIONS = 1&lt;br /&gt;&lt;br /&gt;strIPInput = InputBox("What is the subnet? Format as XX.YY.ZZ.")&lt;br /&gt;strLow = InputBox("What is the low address in the range?")&lt;br /&gt;strHigh = InputBox("What is the highest address in the range?")&lt;br /&gt;&lt;br /&gt;If Right(strIPInput,1) &lt;&gt; "." Then&lt;br /&gt;strIPInput = strIPInput &amp;amp; "."&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If strIPInput = "" OR strLow = "" OR strHigh = "" OR strHigh &gt; 254 Then&lt;br /&gt;Wscript.Echo "Invalid input - Script Cancelled"&lt;br /&gt;wscript.Quit&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;For i = strLow to strHigh&lt;br /&gt;&lt;br /&gt;strComputer = strIPInput &amp;amp; i&lt;br /&gt;&lt;br /&gt;Set objWMIService = GetObject("winmgmts:" &amp;amp; "{impersonationLevel=impersonate}\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")&lt;br /&gt;&lt;br /&gt;Set colItems = objWMIService.ExecQuery ("Select * from Win32_TerminalServiceSetting")&lt;br /&gt;&lt;br /&gt;For Each objItem in colItems&lt;br /&gt;  errResult = objItem.SetAllowTSConnections(ENABLE_CONNECTIONS)&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;WshShell.Popup "Complete", 10, "Remote Desktop Status", 64&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-4548584927402556896?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/4548584927402556896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=4548584927402556896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/4548584927402556896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/4548584927402556896'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/enable-or-disable-remote-desktop-on_10.html' title='Enable or Disable Remote Desktop on Multiple Computers'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-4829417379680032691</id><published>2008-01-06T12:31:00.000-08:00</published><updated>2008-01-17T16:05:46.213-08:00</updated><title type='text'>Adding Network Printers Using a VBS Script</title><content type='html'>This script will install network printers for users that are a member of a specified security group. You can run this from the user's login script.&lt;br /&gt;&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;Dim shellobj, netobj, username, adsobj&lt;br /&gt;&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Set shellobj = WScript.CreateObject("WScript.Shell")&lt;br /&gt;Set netobj = WScript.CreateObject("WScript.Network")&lt;br /&gt;&lt;br /&gt;While username = ""&lt;br /&gt;  username = netobj.UserName&lt;br /&gt;Wend&lt;br /&gt;&lt;br /&gt;adsPath = "WinNT://Active Directory Domain Name/" &amp;amp; username&lt;br /&gt;Set adsobj = GetObject(adsPath)&lt;br /&gt;&lt;br /&gt;For Each Prop IN adsobj.Groups&lt;br /&gt;  Select Case Prop.Name&lt;br /&gt;&lt;br /&gt;  Case "security group"&lt;br /&gt;      netobj.AddWindowsPrinterConnection "\\server name\printer share name"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-4829417379680032691?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/4829417379680032691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=4829417379680032691' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/4829417379680032691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/4829417379680032691'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/adding-network-printers-using-vbs.html' title='Adding Network Printers Using a VBS Script'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-2042242015000507187</id><published>2008-01-05T11:16:00.000-08:00</published><updated>2008-01-05T20:33:41.707-08:00</updated><title type='text'>Create a Desktop Shortcut on the All Users Desktop</title><content type='html'>This script will create a shortcut on the All Users Desktop.&lt;br /&gt;&lt;br /&gt;'VBSBOB&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;'Define the All Users desktop file path.&lt;/span&gt;&lt;br /&gt;allusersdesktop = "C:\Documents and Settings\All Users\Desktop"&lt;br /&gt;&lt;br /&gt;set WshShell = WScript.CreateObject("WScript.Shell")&lt;br /&gt;set oShellLink = WshShell.CreateShortcut(allusersdesktop &amp;amp; "\VBSBob.lnk")&lt;br /&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;'Define where you would like the shortcut to point to. This can be a program, Web site, etc.&lt;/span&gt;&lt;br /&gt; oShellLink.TargetPath = "http://vbsbob.blogspot.com"&lt;br /&gt; oShellLink.WindowStyle = 1&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;'Define what icon the shortcut should use. Here we use the explorer.exe icon.&lt;/span&gt;&lt;br /&gt; oShellLink.IconLocation = "C:\WINDOWS\explorer.exe"&lt;br /&gt; oShellLink.Description = "VBSBob"&lt;br /&gt; oShellLink.WorkingDirectory = allusersdesktop&lt;br /&gt; oShellLink.Save&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-2042242015000507187?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/2042242015000507187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=2042242015000507187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/2042242015000507187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/2042242015000507187'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/create-desktop-shortcut-on-all-users.html' title='Create a Desktop Shortcut on the All Users Desktop'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-9092187353967474158</id><published>2008-01-05T02:07:00.000-08:00</published><updated>2008-01-05T02:18:36.025-08:00</updated><title type='text'>VBS Reference</title><content type='html'>VBS Site Links:&lt;br /&gt;&lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/start.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/start.mspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-9092187353967474158?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/9092187353967474158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=9092187353967474158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/9092187353967474158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/9092187353967474158'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/vbs-reference.html' title='VBS Reference'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6308291653745450993.post-9013053293205636951</id><published>2008-01-05T00:52:00.000-08:00</published><updated>2008-01-05T11:25:01.991-08:00</updated><title type='text'>Lock Workstation</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;I am going to start things off easy. Here is a script I created that will automatically lock a workstation. If you do not know how to create a VBS script, stay tuned. I will post a basic tutorial on creating VBS scripts. Anyway, here is the script; start your copy at 'VBSBOB:&lt;br /&gt;&lt;br /&gt;'VBSBOB&lt;br /&gt;'http://vbsbob.blogspot.com/&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Set objShell = CreateObject("Wscript.Shell")&lt;br /&gt;objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6308291653745450993-9013053293205636951?l=vbsbob.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbsbob.blogspot.com/feeds/9013053293205636951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6308291653745450993&amp;postID=9013053293205636951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/9013053293205636951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6308291653745450993/posts/default/9013053293205636951'/><link rel='alternate' type='text/html' href='http://vbsbob.blogspot.com/2008/01/lock-workstation.html' title='Lock Workstation'/><author><name>Bob</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
