Welcome to ServerForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Remote comuter access + FileSystemObject?

 
   Windows Server (Home) -> Windows Server Scripting RSS
Next:  how to change password on a multiple stand alone ..  
Author Message
Sofia Engvall

External


Since: Aug 26, 2003
Posts: 1



(Msg. 1) Posted: Tue Aug 26, 2003 9:10 am
Post subject: Remote comuter access + FileSystemObject?
Archived from groups: microsoft>public>windows>server>scripting, others (more info?)

Hi! Smile

I'd like to know if it's possible to access the FileSystemObject on a remote
machine. In this case to check the remainging space on the HDs of my file
server.

Right now I can only access the local machine with:
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
For Each objDrive In objFileSystem.Drives
If objDrive.DriveType = 2 Then 'Local Disc
WScript.Echo objDrive.Path
WScript.Echo "Size: " & objDrive.TotalSize
WScript.Echo "Free: " & objDrive.FreeSpace
...
End If
Next

And check the directory sizes with:
Set objFolder = objFileSystem.GetFolder(strPath)
WScript.Echo strPath & " " & objFolder.Size

Is it at all possible to do this on a remote mashine and if so, how?

Thanks a million! Smile

/Sofia Engvall
AB Ångpanneföreningen

 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
JesseH

External


Since: Aug 26, 2003
Posts: 4



(Msg. 2) Posted: Tue Aug 26, 2003 11:33 am
Post subject: Remote comuter access + FileSystemObject? [Login to view extended thread Info.]
Archived from groups: microsoft>public>windows>server>scripting (more info?)

check into WMI or WMIC Wink This will get you EXACTLY what
you need.



>-----Original Message-----
>Hi! Smile
>
>I'd like to know if it's possible to access the
FileSystemObject on a remote
>machine. In this case to check the remainging space on
the HDs of my file
>server.
>
>Right now I can only access the local machine with:
>Set objFileSystem = CreateObject
("Scripting.FileSystemObject")
>For Each objDrive In objFileSystem.Drives
> If objDrive.DriveType = 2 Then 'Local Disc
> WScript.Echo objDrive.Path
> WScript.Echo "Size: " & objDrive.TotalSize
> WScript.Echo "Free: " & objDrive.FreeSpace
> ...
> End If
>Next
>
>And check the directory sizes with:
>Set objFolder = objFileSystem.GetFolder(strPath)
>WScript.Echo strPath & " " & objFolder.Size
>
>Is it at all possible to do this on a remote mashine and
if so, how?
>
>Thanks a million! Smile
>
>/Sofia Engvall
>AB Ångpanneföreningen
>
>
>.
>

 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
Gerry Hickman

External


Since: Aug 26, 2003
Posts: 2



(Msg. 3) Posted: Tue Aug 26, 2003 8:48 pm
Post subject: Re: Remote comuter access + FileSystemObject? [Login to view extended thread Info.]
Archived from groups: microsoft>public>windows>server>scripting, others (more info?)

Sofia Engvall wrote:

> Set objFolder = objFileSystem.GetFolder(strPath)
> WScript.Echo strPath & " " & objFolder.Size
>
> Is it at all possible to do this on a remote mashine and if so, how?

Have a look at WMI for this.

--
Gerry Hickman (London UK)
 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
Aaron J. Scott

External


Since: Aug 27, 2003
Posts: 1



(Msg. 4) Posted: Wed Aug 27, 2003 7:56 pm
Post subject: Re: Remote comuter access + FileSystemObject? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

An alternative is a wsc specified as remote=true in its registration
properties then you would perform your FSO scripting in the WSC and only
expose the info you needed at the remote. Remote components must be
registered on both server and client. Client calls server with
GetObject("Object.Class", "RemoteServer UNC Path")
RemoteServer UNC Path is in the form \\RemoteMachine or
\\RemoteMacine.remoteDomain.rootDomain.
I wouldn't advise leaving a whole lot of the FSO exposed in a remotable
component, it could be devistating in the wrong hands.
"Gerry Hickman" <gerry1uk.DeleteThis@netscape.net> wrote in message
news:O0ZuWrAbDHA.1384@TK2MSFTNGP10.phx.gbl...
> Sofia Engvall wrote:
>
> > Set objFolder = objFileSystem.GetFolder(strPath)
> > WScript.Echo strPath & " " & objFolder.Size
> >
> > Is it at all possible to do this on a remote mashine and if so, how?
>
> Have a look at WMI for this.
>
> --
> Gerry Hickman (London UK)
>
 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
Gerry Hickman

External


Since: Aug 26, 2003
Posts: 2



(Msg. 5) Posted: Thu Aug 28, 2003 9:52 pm
Post subject: Re: Remote comuter access + FileSystemObject? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Aaron J. Scott wrote:
> An alternative is a wsc specified as remote=true in its registration
> properties then you would perform your FSO scripting in the WSC

Surely this would need set up on every machine? FSO is quite capable of
working with remote filez, it's just things like getting disk space may
be a problem (and better handled by WMI).

--
Gerry Hickman (London UK)
 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
Sofia Engvall

External


Since: Sep 08, 2003
Posts: 4



(Msg. 6) Posted: Wed Sep 03, 2003 3:39 pm
Post subject: Re: Remote comuter access + FileSystemObject? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Could anyone give me an WMI example of this, please. Smile

Thanks a million! Smile

/Sofia


"Gerry Hickman" <gerry1uk.RemoveThis@netscape.net> wrote in message
news:e$ZUGYabDHA.1180@TK2MSFTNGP11.phx.gbl...
> Aaron J. Scott wrote:
> > An alternative is a wsc specified as remote=true in its registration
> > properties then you would perform your FSO scripting in the WSC
>
> Surely this would need set up on every machine? FSO is quite capable of
> working with remote filez, it's just things like getting disk space may
> be a problem (and better handled by WMI).
>
> --
> Gerry Hickman (London UK)
>
 >> Stay informed about: Remote comuter access + FileSystemObject? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Connecting to a remote machine - Hi, I am having trouble connecting to remote machines. My script will connect to a few of the machines on our network, but not others. I know this is a broad question, but any ideas on why this is happening? This is line it crashes on: Set oWMI =..

Folders access right - I am creating 200 folders for new users. Browsing the Microsoft scripting center, I still cannot get a vb script to modify the folder access right. It's really time consuming to change it manually. Pls help!
   Windows Server (Home) -> Windows Server Scripting All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]