Re: possible to execute DOS commands without using "wscript.Shell"?
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 06/08/04
- Next message: Viatcheslav V. Vassiliev: "Re: RecordCount -1"
- Previous message: Torgeir Bakken \(MVP\): "Re: Dumping AD site info"
- In reply to: sumGirl: "possible to execute DOS commands without using "wscript.Shell"?"
- Next in thread: Tom Lavedas: "Re: possible to execute DOS commands without using "wscript.Shell"?"
- Reply: Tom Lavedas: "Re: possible to execute DOS commands without using "wscript.Shell"?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 08 Jun 2004 23:44:25 +0200
sumGirl wrote:
> I cant get wscript.shell to work on any of the Win98 machines we have
> here...I know WTF with the Win98? Anyway, is there a way to execute
> DOS commands or a batch file from VBScript without resorting to
> something like
> Set WshShell = WScript.CreateObject("WScript.Shell")?
Hi
I think the Shell.Application object is available for Win98:
Set oWShellExt = CreateObject("Shell.Application")
' now call the ShellExecute method, which is member
' of the IShellDispatch2 class (this class is only
' supported in Shell32.dll Version 5.0)
'
' Interface: ShellExecute (file, arguments, dir, operation, show)
' the first parameter is mandatory
' file: the file to execute
' arguments: arguments for the executable
' dir: working directory
' operation: operation to execute
' show: view mode application window
oWShellExt.ShellExecute ...
ShellExecute Method
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/objects/ishelldispatch2/shellexecute.asp
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/community/scriptcenter/default.mspx
- Next message: Viatcheslav V. Vassiliev: "Re: RecordCount -1"
- Previous message: Torgeir Bakken \(MVP\): "Re: Dumping AD site info"
- In reply to: sumGirl: "possible to execute DOS commands without using "wscript.Shell"?"
- Next in thread: Tom Lavedas: "Re: possible to execute DOS commands without using "wscript.Shell"?"
- Reply: Tom Lavedas: "Re: possible to execute DOS commands without using "wscript.Shell"?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|