Runing the Notepad in VBScript 
Author Message
 Runing the Notepad in VBScript

Someone can tell me how can I run the command C:\Windows\Notepad.exe in
VBScript.?
I know that in Visual Basic I can use Call Shell("C:\WINDOWS\NOTEPAD.EXE",
1), but in VBScript the function Shell doesn't exist.
Thanks. Horacio



Thu, 03 Apr 2003 03:00:00 GMT  
 Runing the Notepad in VBScript

In VBscript you'll have to call the
WScript.Shell-Object and use its run-method:

call createobject("wscript.shell").run("notepad")
opens notepad

the correct or usual sysntax for this is

set wshshell = WScript.CreateObject("Wscript.Shell")
wshshell.run "c:\windows\notepad.exe",1

see also the docs (VBscript and WSH - doc)

http://mdsn.microsoft.com/scripting

  Thorsten


Quote:
> Someone can tell me how can I run the command C:\Windows\Notepad.exe in
> VBScript.?
> I know that in Visual Basic I can use Call Shell("C:\WINDOWS\NOTEPAD.EXE",
> 1), but in VBScript the function Shell doesn't exist.
> Thanks. Horacio



Fri, 04 Apr 2003 09:56:21 GMT  
 Runing the Notepad in VBScript

Quote:

> http://mdsn.microsoft.com/scripting

sorry,
http://msdn.microsoft.com/scripting

  Thorsten



Fri, 04 Apr 2003 10:12:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. runing txt file inside notepad

2. manipulate Notepad from Word, Excel or VBScript?

3. How do I run notepad.exe on the server using vbscript

4. use vbscript to launch notepad

5. Open notepad with vbscript?

6. Runing programs in WSH

7. Runing console mode aplications

8. Updating a textbox on a form while runing code???/

9. Runing a Power Point slideshows from another presentation

10. Runing Mcro when Open Word & auto installation

11. help runing of Duwamish enterprise sample??

12. How to switch among runing applications on WinNT

 

 
Powered by phpBB® Forum Software