Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Systemroot and systemdrive of a remote machine

Status
Not open for further replies.

Ross1811

MIS
Oct 1, 2004
122
US
Hello everyone,

Just a quick and easy one how do you get the %systemdrive% and %systemroot% of a remote computer. I need to put them together too such as C:\windows and put that into a variable,

Thanks,
Ross
 
Try using the following method:
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set dirwin = fso.GetSpecialFolder(0)
Set dirsystem = fso.GetSpecialFolder(1)
Set dirtemp = fso.GetSpecialFolder(2)

msgbox (dirwin)
msgbox (dirsystem)
msgbox (dirtemp)

This retrieves:
dirwin = The Windows folder contains files installed by the Windows operating system.

dirsystem = The System folder contains libraries, fonts, and device drivers.

dirtemp = The Temp folder is used to store temporary files. Its path is found in the TMP environment variable.




Applications Support
UK
 
You may consider remote scripting.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top