danhale-git/runrdp

Fix file management in rdp.Connect()

danhale-git opened this issue · 2 comments

Currently this function runs the file, defers os.Remove() and waits one second. This is probably buggy, find a better way to ensure the file is removed while letting the RDP application read it.

Also, use https://golang.org/pkg/text/template/ to format the file contents.

Before any of this is done, consider whether the file is even necessary. If #38 gets implemented then why not use command line (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc) for windows and remove the need for a .rdp file.