使用WSH或WMI或类似的窗户进入一个窗户? 我只想把窗户贴上永远不变的旗帜。 理想的情况是,我使用窗户。
请注意,我不想在有关系统中安装PowerShell。 我们对于任何额外的软件都很疲.,并且已经掌握了某些涉及的VBS文档。
关于
使用WSH或WMI或类似的窗户进入一个窗户? 我只想把窗户贴上永远不变的旗帜。 理想的情况是,我使用窗户。
请注意,我不想在有关系统中安装PowerShell。 我们对于任何额外的软件都很疲.,并且已经掌握了某些涉及的VBS文档。
关于
Private Const Firefox = "C:App32Mozilla Firefoxfirefox.exe"
Private Const IE8 = "C:App32Internet Exploreriexplore.exe"
Private Const Opera = "C:App32Operaopera.exe"
Private Const Chrome = "C:App32GoogleChromeApplication
ew_chrome.exe"
Private Const Safari = "C:App32SafariSafari.exe"
Private Const ShowTime =20000
Private Const TechWait =200
Private Const CloseWait =1000
If WScript.Arguments.Count <1 then
Wscript.Echo "URL not found!" & vbCrLf &_
vbCrLf &_
"ex 1: " & vbCrLf &_
Wscript.ScriptName & " ""<URI>" & vbCrLf &_
"ex 2: " & vbCrLf &_
Wscript.ScriptName & " ""http://www.google.com"
Wscript.Quit(10)
End If
Set oShell=CreateObject("Wscript.Shell")
Set oCommand=oShell.exec(Firefox & " " & WScript.Arguments(0))
FirefoxPid=oCommand.ProcessID
Set oCommand=oShell.exec(IE8 & " " & WScript.Arguments(0))
IE8Pid=oCommand.ProcessID
Set oCommand=oShell.exec(Opera & " " & WScript.Arguments(0))
OperaPid=oCommand.ProcessID
Set oCommand=oShell.exec(Chrome & " " & WScript.Arguments(0))
ChromePid=oCommand.ProcessID
Set oCommand=oShell.exec(Safari & " " & WScript.Arguments(0))
SafariPid=oCommand.ProcessID
WScript.Sleep ShowTime
oShell.AppActivate(FirefoxPid)
WScript.Sleep TechWait
oShell.SendKeys "%{F4}"
WScript.Sleep CloseWait
oShell.AppActivate(IE8Pid)
WScript.Sleep TechWait
oShell.SendKeys "%{F4}"
WScript.Sleep CloseWait
oShell.AppActivate(OperaPid)
WScript.Sleep TechWait
oShell.SendKeys "%{F4}"
WScript.Sleep CloseWait
oShell.AppActivate(ChromePid)
WScript.Sleep TechWait
oShell.SendKeys "%{F4}"
WScript.Sleep CloseWait
oShell.AppActivate(SafariPid)
WScript.Sleep TechWait
oShell.SendKeys "%{F4}"
Set oCommand = Nothing
Set oShell = Nothing
Private Const wbemFlagReturnImmediately = 16
Private Const wbemFlagForwardOnly = 32
Dim strComputer, objWMIService, strUserName, strPassword
UserName = ""
Password = ""
strComputer = "."
Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = SWBemlocator.ConnectServer(strComputer,"rootCIMV2",strUserName,strPassword)
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem in colItems
WScript.Echo objItem.Caption, objItem.ProcessId, objItem.Commandline
Next
see ... wmic CLASS win32_process > C:4.html
Wmic process where (Name= eclipse.exe ) have/61/7Line, Process Id
如果需要,可制作假肢和编辑新的轮椅功能。
I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...
Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...
I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...
How can I create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt But it always displays that a file was copied. Is there another method in the standard cmd? It should ...
I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...
My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...
Yes, I know, the archive bit is evil. That being said, is there support for querying it with find , and modifying it with chmod ? My googling has turned up nothing......
I built a Java application that is delivered on USB sticks. To ensure compatibility, I ship an appropriate JVM on the sticks. I made an EXE that simply invokes this JVM with the application jar. Now ...