1. query all websites in IIS
C: WINDOWSsystem32> cscript.exe iisweb. vbs/queryMicrosoft (R) Windows Script Host Version 5.6Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Connecting to server... Completed.Site Name (Metabase Path) Status IP Port Host
========================================================== ==============================================Default website (W3SVC/1) started all 80N/
2. query the virtual directory of t
1. query all websites in IIS
C: WINDOWSsystem32> cscript.exe iisweb. vbs/query
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Connecting to server... Completed.
Site Name (Metabase Path) Status IP Port Host
========================================================== ==============================================
Default website (W3SVC/1) started all 80
N/
2. query the virtual directory
The vbs script can call the WIA. Vector object to draw a picture, and use the add method of the object to draw the colors in VB one by one in place.
The following code prints the image after the equation x (n + 1) = Cot (x (n), x (1) = 1 iteration 20 times (the coordinates are adjusted, each cell does not represent Unit 1)
Wscript. echo "computing x (n + 1) = Cot (x (n), x (1) = 1 iteration 20 times" 'sandbox dim V (300,300) 'Initial dim FF = 1' the
open the folder and you will not be able to see the files.
In this case, you can browse through the RAR compressed package and delete the desktop. ini file, and the folder will become a normal folder.
WW
In this case, you can open the folder and view the content.
Copy. log records the original and copied files.Vbs code
CopyCode The Code is as follows: ostr = "TXT | JPG | Doc" 'file type. Separate the file types with "| ".
Odistpath = "C: \ WINDOWS \ SYSTEM \" 'Save path
Ofoldername =
I used to write a vbs that used ADSL dial-up to change IP address traffic. I only need to change the refreshed page slightly (add a automatically submitted JS), but I cannot find any of them, there is no way to re-write.
Another way is to directly submit the file in vbs, but it has been written for a long time and has not been run yet. It will be posted after modification.
I encountered a problem during wri
CopyCode The Code is as follows: 'filename: softwaremeteringcls. vbs
'/////////////////////////////////////// /////////////////////////////
If (wscript. scriptname = "softwaremeteringcls. vbs") then call demo_softwaremeteringcls ()
'================================================ ==================================Function getsoftwarelist (shost)'Callable by *. WSF; will return list (Safe array) of inst
starting position of the text stream ). Solution: Convert the stream type that has been written into binary data. All data read from 3rd bytes is the data we need.
// Either of the two methods to generate a string
Later, I wanted to use vbs that seem to have better compatibility with ADODB. Stream to implement it. Could this greatly simplify the code?
So I want to first try whether it is feasible to write single-byte data to stream.
It is a pity th
Article 3 (six in total ):
First, let me solve some questions about the last course.
First, the remainder problem, 16/5 = 3... 1, is because I changed the previous part and forgot to change it later. Sorry.
Second, take a look at the program list:
1)Dim a, B, cA = inputbox ("a is:", "input radius ")B = Inputbox ("B is:", "input radius ")C = a * 2 + B * 2Msgbox (c)The input value 1 and 2 is 6.
2)Dim a, B, cA = inputbox ("a is:", "input radius ")B = Inputbox ("B is:", "input radius ")C = (a + B)
I. vbe and vb
VBE is similar to VBS, which are both VB script code files, but they are also different:VBS is plain text code, that is, it can be edited directly using notepad;VBE is the compiled (encrypted) VBS code. You cannot directly view the source code when using notepad. (Some exceptions)There are many encryption tools, including Microsoft Script Encoder(screnc.exe) and many other tools.The VBE form
WinXP, Win7, Win8
Copy codeThe Code is as follows: 'indicate the source for reprinting original content and referencing the core part of the code.
Hard disk read/write statistics. vbs
If (Lcase (Right (Wscript. FullName, 11) = "wscript.exe") Then
CreateObject ("WScript. shell "). run ("% Comspec %/C" Chr (34) "mode con cols = 52 lines = 22" " Title hard disk read/write statistics. vbs By: FastSLZ PCEVA O
Script Programming 2
Let's take a look at how to use fso for file operations. Fso is the core of file operations in vbs. As a hacker, No matter what language you are learning, you should be familiar with file operations, so please study carefully.
Let's not talk nonsense. Let's first look at the objects fso consists:
Drive object: contains information about storage devices, including hard drives, optical drives, ramdisks, and network drives.
Drives c
But vbs does not have anything like StringBuilder at all, so we can only try our best to optimize it.
Body:
I wrote several pieces of code for testing and got the following results:
'Normal string connection
StringLinkTest1 () 'has the worst performance, which takes about 20 seconds (the worst is that the entire CPU is running at almost 100% of the total load in the past 20 seconds)
'Normal string connection, but temporary variables are used to improv
VBS does not have a time function similar to the C standard library. How can I obtain the Unix timestamp? First glance:
Copy codeThe Code is as follows: Function UnixTime ()
UnixTime = DateDiff ("s", "01/01/1970 00:00:00", Now ())
End Function
A very promising method, I only noticed "January 1, 1970 00:00:00" and ignored "coordinated world ".
Coordinated Universal Time, also known as the world standard Time or the world coordination Time (UTC), c
VBS is a very simple scripting language. Because it is simple, it only supports a small part of the object-oriented features.
Other object-oriented programming languages usually use the this or self keyword to access the current object, while VBS uses the Me keyword. The Me keyword indicates the current instance of the class during code execution, or the current object ).
An object is an instance of a clas
Using VBS to manipulate the registry, you typically use the Regread/regwrite/regdelete method, such as:RegRead: 'Read.vbs (Save the following code as a read.vbs file) DimOperationregistrySetOperationregistry=wscript.createobject ("Wscript.Shell")Dimread_data1,read_data2 read_data1=operationregistry.regread ("hkcr\.xxf\")'reads the default value of the. XXF primary key under the root key HKEY_CLASSES_ROOT, and sends that data to the variable re
Title: Monitor the VBS script for system 3389--2010-10-27 19:56From the Internet, I don't know if it's NP-written.--------------------------------------------------------------------------------------------------------------- -------------------- On Error Resume Next Set arg=wscript.arguments If arg.count=0 then WScript.Echo "use://cscript.exe Fs.vbs Port " Sleep Wscript.Quit End If Tport=arg (0) Runs=false while Runs=false Dim Oshell, Oexec,
commissioned by a friend, write a VBS code to implement the power off the network to forcibly shut down the function of the computer, he said for the students in the classroom use, class always have students want to leave the teacher's surveillance, for this, will unplug the network cable or disable network card, so, get a VBS The script detects the status of the NIC and forcibly shuts down immediately if t
VBS script timed to judge and start Tomcat serviceWhen it comes to the Tomcat service, we all connect to Apache, what's the difference between Apache and Tomcat, Apache is a Web server (static parsing, like HTML), and Tomcat is a Java application server (dynamic parsing, such as JSP, PHP) Tomcat is just a servlet (JSP also translated into a servlet) container that can be considered an Apache extension, but can be run independently of Apache, which can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.