WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: erezpaz on May 17, 2015, 01:53:27 AM

Title: Windows Vualt
Post by: erezpaz on May 17, 2015, 01:53:27 AM
Hi

I want to store password I get from a user to local Windows vault and then extract them as needed in my script. I used to encrypt them and put in text but using the Windows vault is much more secure.

See working with Windows vault in powershell
https://gallery.technet.microsoft.com/scriptcenter/Cached-Credentials-99b1dfdc

Help would be appreciated.

Thanks
Erez
Title: Re: Windows Vualt
Post by: stanl on May 17, 2015, 11:59:00 AM
Have you looked at cmdkey (which comes with Win7/Win8). It would be a little messy bu perhaps easier to code with WB then going the CLR or Powershell route. However, I may have a script that worls with the vault and if I find it I will post for you to look at.
Title: Re: Windows Vualt
Post by: td on May 18, 2015, 07:16:12 AM
In other words, the Powershell script is just wrapping the cmdkey.exe command line utility.  There are numerous ways to do that in WinBatch with examples of most of them in the Tech Database.   One relatively simply approach is to use the built in 'WShell.Script' Windows shell object to capture command line utility output

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/DOS+Get~results~from~STDOUT~-~UDF.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/DOS+Get~results~from~STDOUT~-~UDF.txt)