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) Select


;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
Quote from: JTaylor on September 15, 2021, 06:20:52 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.