Microsoft Windows Scripting Self-Paced Learning Guide

http://www.mums.ac.ir/shares/hit/eduhit/book/windowsscripting.pdf
http://support.microsoft.com/kb/926352/en-us
https://www.microsoft.com/learning/en-us/book.aspx?id=6789
FilterPrinterStatus.vbs

Option Explicit
‘On Error Resume Next
Dim strComputer
Dim wmiNS
Dim wmiQuery
Dim objWMIService
Dim colItems
Dim objItem
Dim strStatus
strComputer = "."
wmiNS = "\root\cimv2"
wmiQuery = "Select * from Win32_Printer" _
& " Where PrinterStatus = 1" _
& " or PrinterStatus = 2" _
& " or PrinterStatus = 7"
Set objWMIService = GetObject("winmgmts:\\" _
& strComputer & wmiNS)
Set colItems = objWMIService.ExecQuery(wmiQuery)
If colItems.Count = 0 Then
WScript.Echo "all printers are fine"
Else
For Each objItem In colItems
WScript.Echo "Name: " & objItem.Name
WScript.Echo "Location: " & objItem.Location
subEvalStatus
WScript.Echo "Printer Status: " & strStatus
WScript.Echo "Server Name: " & objItem.ServerName
WScript.Echo "Share Name: " & objItem.ShareName
WScript.Echo
Next
End If
Sub subEvalStatus
Select Case objItem.PrinterStatus
Case 1
strStatus = "Other"
Case 2
strStatus = "Unknown"
Case 3
strStatus = "Idle"
Case 4
strStatus = "Printing"
Case 5
strStatus = "Warmup"
Case 6
strStatus = "Stopped Printing"
Case 7
strStatus = "Offline"
End Select
End Sub

Microsoft Windows Scripting Self-Paced Learning Guide,布布扣,bubuko.com

时间: 2024-12-11 15:24:58

Microsoft Windows Scripting Self-Paced Learning Guide的相关文章

Installing node-oracledb on Microsoft Windows

版本 7 由 Laura Ramsey-Oracle 于 2015-10-19 下午11:46创建,最后由 cj 于 2015-10-22 下午7:44修改. Installing node-oracledb on Microsoft Windows Bill Christo In this article Bill Christo (bchr02) leads you step-by-step though the process of installing node-oracledb on

Microsoft Windows 8.1 使用记录

从今天开始,我将会把对 Windows 8.1 的一些设置记录下来. Windows 10 品控感人...... 还是 8.1 好用,磁贴开始菜单其实很好用,只要心里面不排斥它. 但 是微软最近在丧心病狂的向 Windows 7.Windows 8.1 用户推送“升级 Windows 10”的补丁,甚至偷偷把升级文件下载到用户 硬盘上.重要的是,即使我卸载并隐藏了 KB3035583 补丁,Windows还会把它偷偷装上!要想眼不见为净的话,可以这么做.... 进 入 Windows RE 命令

Microsoft Windows 2003 SP2 - 'ERRATICGOPHER' SMB Remote Code Execution

EDB-ID: 41929 Author: vportal Published: 2017-04-25 CVE: N/A Type: Remote Platform: Windows Aliases: ERRATICGOPHER Advisory/Source: N/A Tags: N/A E-DB Verified:  Exploit:  Download/ View Raw Vulnerable App: N/A #!/usr/bin/env python # -*- coding: utf

Hyperion Business Modeling for Microsoft Windows (32-bit)

介质包搜索 常见问题    说明 复查 许可证列表 以确定需要下载的产品程序包. 请选择产品程序包和平台,然后单击“查找”. 如果只有一项结果,则可以看到下载页.如果有多个结果,请选择一个,然后单击“继续”.     选择产品程序包      - 选择产品程序包 - ATG Web Commerce E-Business Suite E-Business Suite Self-Study Health Sciences Hyperion Performance Management and BI

DB Query Analyzer 6.03, the most excellent Universal DB Access tools on any Microsoft Windows OS

?  ?DB Query Analyzer 6.03, the most excellent Universal database Access tools on any Microsoft Windows OS DB Query Analyzer is presented by Master Genfeng, Ma from Chinese Mainland. It has English version named 'DB Query Analyzer' and Simplified Chi

Oracle Fusion Applications (11.1.8) Media Pack and Oracle Application Development Framework 11g (11.1.1.7.2) for Microsoft Windows x64 (64-bit)

Oracle Fusion Applications (11.1.8) Media Pack for Microsoft Windows x64 (64-bit) 重新搜索   常见问题    提示      查看自述文件可帮助确定需要下载的文件. 请打印包含可下载文件列表的页面.该页面包含部件号列表,以及在安装过程中可能需要参考的相应说明. endv 您好!单击下载按钮即表示您同意使用此门户 上的软件所适用的 Oracle 条款和条件.不是 endv?请勿下载此软件并 使用您的帐户登录.END

需要正确安装 Microsoft.Windows.ShellExperienceHost 和 "Microsoft.Windows.Cortana" 应用程序。

windows 10 开始菜单修复工具 Win10开始菜单修复工具出现的原因,自从升级到Windows  10,一直BUG不断,而其中有一个BUG非常的让你印象深刻,就是开始菜单无响应,你用着用着电脑的时候,或者急着从开始菜单打开软件的时候,忽然之间就郁闷了,无论用户点击开始菜单按钮还是任务栏中的图标,都会出现无响应,最后无奈之下,只好重启系统了事,说不定你到来的灵感,就此消失. 下载 windows 10 开始菜单修复工具:startmenu.diagcab 检测会发现如下错误: 1 错误:所

The useful App Paths registry key : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths how to load BPLs without writing them in the system directory or in the application directory. I suggested to use the "App paths" registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Mi

Microsoft Windows Server 2008部署Magic Winmail

今天朋友公司做内网,需求是mail跟文件共享,之前在Microsoft Windows Server 2003部署Magic Winmail 4.7的时候基本很简单,装完简单配置就能正常使用.想到2003显得太陈旧了于是给朋友公司做了个Microsoft Windows Server 2008 X86 Enterprise版本的服务器,安装完Magic Winmail之后发现像03一样配置后没法用. 首先看下服务,Winmail的服务是正常运行的,在本机telnet 25 110 465 995