WinBatch Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: stanl on September 15, 2021, 03:00:36 am

Title: CLR: simple password generator
Post by: stanl on September 15, 2021, 03:00:36 am
takes password length and number of non-characters as parameters:
Code: Winbatch

;simple password generator with CLR
length = 10
nonchars = 3
ObjectClrOption('useany', 'System.Web')
oSecure = ObjectClrNew("System.Web.Security.Membership")
password = oSecure.GeneratePassword(length,nonchars)
Message("Password Created",password)
Exit


 
Title: Re: CLR: simple password generator
Post by: JTaylor on September 15, 2021, 06:20:52 am
Thanks.  Was just looking for something like this the other day.   

Jim
Title: Re: CLR: simple password generator
Post by: stanl on September 16, 2021, 11:12:05 am
Thanks.  Was just looking for something like this the other day.   

Jim


You are welcome. See that this works well for sending out input passwords based on timer to receive a download.