Sign in to follow this  
Followers 0
lrstndm

Get free space of network computer

5 posts in this topic

Is it possible to get the free space of a specific drive of a network computer?

Is saw a program on the forum but for this you needed to share the drive.

Is it possible to read the values without sharing the drive?

Regards,

lrstndm

Share this post


Link to post
Share on other sites



yes, the drive must be shared - but no, you don't have to do it yourself. drives are shared by default: hostnamec$ is drive C over network. just make sure you have administrative permissions on the host, then:

DriveSpaceFree("\\hostname\c$")

Share this post


Link to post
Share on other sites

Okey, thanks orbs!

Share this post


Link to post
Share on other sites

When I type in the explorer COMPUTERNAMEC$, windows asks for a username and password. Using autoit the DriveSpaceFree methode gives 0. Is it possible to login or something using the DriveSpaceFree methode?

Or does the username and password have to be equal from my computer and the computer I connect to?

Regards,

lrstndm

Share this post


Link to post
Share on other sites

as i said,

 

 just make sure you have administrative permissions on the host

 

you have 3 options:

1) give yourself (even temporarily) admin rights on the remote host

2) use DriveMapAdd() and specify the credentials, and later use DriveMapDel()

3) RunAs() your script from batch file or from another script

option (3) is recommended, as (1) cripples automation, and (2) exposes the network drive to misuse.

to your consideration.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0