How do I emulate using MS Terminal Services to check if a certain software is installed?

0

Any ideas on how to emulate the following process?

Log in to a system using MS Terminal Services and check if a folder is present.

I know how to use various scripting languages to check if a folder or file is present on a system but I am not quite sure how to emulate the use of an RDP client. I have to use RDP because filesystem access like SMB is not available, only RDP port is available.

chrips

Posted 2014-09-19T15:02:23.213

Reputation: 181

If you just want to know if a folder is there, why use RDP? Why not just use a file-level connection (SMB, FTP) to look for a folder, and/or WMI to check to see if the software is officially "Installed" or not (ie: in Add/Remove Programs)? – Ƭᴇcʜιᴇ007 – 2014-09-19T16:06:54.613

The system is not accessible on SMB port, only through RDP. I guess I should add that to the description – chrips – 2014-09-19T16:13:22.663

What about drive redirection? If drive redirection is available, then you have access to \tsclient share on the remote machine, meaning that you can either run local scripts or save the output of remote scripts locally (which should achieve your goal); e.g.: dir c:\testfolder >> \tsclient\c\users\tempfile.log – cdavid – 2014-09-19T20:04:43.877

Answers

1

There no "scriptable RDP clients" that I'm aware of, so you'd have to write your own custom one.

See these StackOverflow questions for some starting points on that:

Alternatively, I'd suggest looking into creating a Task on the target server that checks the file (and then emails you the result) upon login of your specific user, and then create a Task on your workstation that will use the standard RDP client to log into the server at your chosen time(s), wait a bit, and then logout/disconnect (therefore triggering the server-side script).

Ƭᴇcʜιᴇ007

Posted 2014-09-19T15:02:23.213

Reputation: 103 763