Jump to content

Get free space of network computer


lrstndm
 Share

Recommended Posts

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$")

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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

Link to comment
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.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...