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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display windows directory on remote computer

Status
Not open for further replies.

mark01

Technical User
Jan 17, 2001
600
US
I'd like to have an app display the windows directory on a remote computer. For example, I need to find the windows directory of a computer named WS1.
It should return..

WINDOWS -or-
WINNT

Any ideas?

thanks
 
If the user of the program has domain admin privs, you can access the remote computer using:

\\ws1\c$\...

and use the dir command to test for those directories. You can also have it iterate over just the directories in the c: drive.

Otherwise, you'll need a share on the c: drive.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Well, I have a whole bunch of workstations. Each have different windows directories.

c:\winxp
c:\windowsxp
c:\windows
c:\winxp
etc

It would be too much to try and say:
If winxp then...

On the dos prompt, you can use %windir%, and it will give you c:\windows.

That is kind of what I want to use, but i would like to use it to remotely find out their windows directory.
 
Mark

This may be a long winded way of doing it but I'm in the throws of developing a system analyser for my company and I am getting it to run the SET command at the DOS prompt.

I doubt it's many steps from there to getting the SET output to a file and having that file e-mailed to you.

Hope I was of some help.


-----------------
Cogito Ergo Sum
-----------------
 
You'll need to be an administrator on the other machine, but I would just display the contents of the registry key:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\PathName

Hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top