English Translation of Script Examples vbscript autoit php batch
Sprache ändernEnglish (United Kingdom) German (DE)

run external in vbscript

(17)
rate this article
(65)

external files called from vbscript

you can use vbscript to open a command prompt:

Sourcecode:
Set wshshell = WScript.CreateObject ("wscript.shell")
wshshell.run "c:\Windows\system32\cmd.exe", 6, True
set wshshell = nothing


the parameter 6: Minimize the window
0: hiding the window and activates another
1: activates and displays a window
2: activates and minimize the window
3: activates and maximizes the window
4: shows the window in his last position, the active window remains active
5: shows the window in its last size and position
6: minimizes the window and activates another
7: minimizes the window the active window remains active
8: shows the window in his last position, the active window remains active
9: a minimized window is restored to its original state
10: the window is equal to the program

True: script waits until the task is completed, False: Script doesn't stop
Optionally, the path for running the external program can be defined:
wshshell.currentdirectory="c:\temp"
(the command must of course be inserted before WshShell.Run)





run.vbs Größe:(0.13 kB): Download

<<< create your first vbscript file how to Compare in vbscript >>>


new article

Search on this page
22.10.2019 20:36 now 1 Reader online