title: calling CryptProtectData function from javascript or vbscript
body: <p>I am creating a site where users can save different credentials and while logging to a VM, they can simply choose to log in using a particular credential. Therefore, I have to generate a rdp file containing the username/password selected. That is fine, but the problem is the password in a rdp file needs to be encrypted using CryptProtectData function found in crypt32.dll. This can be done without a sweat but the problem is the file can be decrypted only on that computer on which it was created.</p>
  
  <p>Therefore, even if I create a rdp file on the fly and send it to the clients, they are not able to open it as it was not created on their machine. So, I have to somehow encrypt the password from the client side and generate the rdp file. But I can't get to know how do I call functions of COM objects from the client side.</p>
  
  <p>Please help.</p>