WinBatch® Technical Support Forum

Archived Boards => COM Automation and dotNet => Topic started by: stanl on June 17, 2013, 11:01:51 AM

Title: Finally Getting the Hang of It
Post by: stanl on June 17, 2013, 11:01:51 AM
works well:

;Winbatch 2013 - CLR Generate Password
;
;
;Stan Littlefield June 17, 2013
;////////////////////////////////////////////////////////////////////////////////////////////////////////
pwklength=9
pwnoalpha=4
ObjectClrOption("use","System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
oSecure = ObjectClrNew('System.Web.Security.Membership')   
cPw =  oSecure.GeneratePassword(pwklength,pwnoalpha)
oSecure=0
Message("",cPW)
Exit 
Title: Re: Finally Getting the Hang of It
Post by: Deana on June 17, 2013, 11:22:44 AM
Indeed. Thanks for sharing.