-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add Launch option to Get-RDP command #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @DeepakRajendranMsft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
|
Update release notes |
|
@ogail updated release notes |
|
@DeepakRajendranMsft Thank you -- I checked out the PR and the parameter sets look good. However, I'm curious about the implementation of the mstsc.exe invocation. Is there a reason that you're wrapping the invocation inside a batch file? Isn't that going to leave a bunch of .bat files on the user's filesystem? Cheers, |
|
@pcgeek86. thanks for the feedback, TBH, I dont have a good explanation for this. this is the same implementation as in the existing non-arm cmdlet |
|
@DeepakRajendranMsft Cool, thanks for validating. Seems like a good opportunity to fix it then. Right? :) |
|
The batch file takes care of deleting the rdp and the batch itself file after mstsc is invoked so we should be okay right. (?) Also verified that we actually delete both the rdp and batch file |
|
Gotcha, I guess I just don't see a need to create the batch file in the first place. It's adding an additional layer of overhead that isn't necessary. Just invoke Cheers, |
|
@pcgeek86 yes i agree with you, we can invoke mstsc.exe directly. but the batch file is in there to delete the temporary rdp file(after the user is done with the RDP) that will be created when the user doesnt specify the "-localpath". If it is okay to leave the temp rdp file in the temp dir, if so we can remove the batch file (or is there a better way to deal with the temp rdp file) |
|
@DeepakRajendranMsft If the user downloads the file using the https://msdn.microsoft.com/en-us/library/system.io.file.delete(v=vs.110).aspx Cheers, |
|
Oh wait, I think I see what you're saying. The batch file lifetime is outside the RDP process lifetime. When the Cheers, |
|
Actually wait, once the RDP file is invoked, does |
|
hmmm let me try that (i dont there is a lock), will confirm |
|
@DeepakRajendranMsft Thank you -- appreciate your discussion around this topic. |
|
@pcgeek86 mstsc doesnt seem to take a lock. but it looks like i need to put a sleep after the process has started and before i delete the file. (since the file sometimes gets deleted before we delete the process. I didnt find any api on process to wait on start). So i think the current implementation is probably the best and simple. example of waiting: } or use Process.waitForIdleTimeout() |
Add Launch option to Get-RDP command
No description provided.