Hello Fellow Members,

I am currently developing a java program that remotely access a desktop(different network), the reason is the program I am curretly working will delete some of the temp logs that are generated with some other validations. Below are some of the information that might help you in assisting me.

  • Its a windows machine(7 & XP)
  • I will be having the machine name of the remote machine(just like we use to access remote desktop in windows)
  • Login credentials
  • IP Address

What APIs can be helpful in this, I am not asking for code just an idea.

Thanks,
Ishan Shah
ishannshah@gmail.com

Dani AI

Generated

For — since the goal is to run automated cleanup/validation, a full GUI Remote Desktop session is usually unnecessary. Headless remote execution is simpler to script and more reliable for automation. The native Windows option is WinRM / PowerShell Remoting (enable with Enable-PSRemoting -Force and use ports 5985/5986), and from Java you can call PowerShell or commands via a WinRM client such as winrm4j. (learn.microsoft.com)

Other practical approaches: use PsExec for quick remote command runs, WMI/CIM for management operations, or access files over SMB and remove them via an admin share. For Java SMB clients prefer SMBJ (SMB2/3) rather than legacy jCIFS (SMB1-only). If you can install OpenSSH on the Windows host, SSH is another straightforward option. Each choice has different firewall/auth requirements, so pick the one that fits your security model. (learn.microsoft.com)

Security and workflow notes: never expose RDP/SMB directly to the public Internet — use a VPN or an RDP gateway, or secure WinRM with HTTPS. Recommended quick plan: (1) test your chosen method on the LAN, (2) enable/configure remoting on the target, (3) limit firewall/trusted hosts and use least-privilege credentials, (4) automate from Java and log results. Follow official guidance for ports, listeners, and hardening before opening access. (learn.microsoft.com)

Credit: pointed out Java RDP clients exist, but for automated cleanup a headless API is usually easier to maintain.

Recommended Answers

All 2 Replies

Thank you for your reply, but this is more than I want, I am searching this project and will reply about the findings :)

Thanks,
Ishan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.