|
-
Apr 7th, 2004, 07:23 AM
#1
Thread Starter
Junior Member
shell not working :-/ [resolved]
hi, trying to get the names of the computers connected on the network:
Code:
Option Explicit
Dim wShell
Set wShell = WScript.CreateObject("WScript.Shell")
wShell.Run "net view>c:\new\temp.txt", 2,true
Set wShell = Nothing
The file temp.txt does exist, but nothing is written to it 
Anyone know why?
Thanks,
Amleto
edit:
got this to work:
Code:
wShell.Run "cmd /c net view>c:\new\temp.txt", 2,true
Last edited by Amleto; Apr 8th, 2004 at 06:21 AM.
-
Apr 7th, 2004, 07:57 AM
#2
Why don't you just use Shell(...)?
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
-
Apr 7th, 2004, 08:07 AM
#3
Thread Starter
Junior Member
Because it doesn't work in vbs
-
Apr 8th, 2004, 02:05 AM
#4
Sorry, didn't realise what language you were using.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|