Generate Password

Declaration

<AMGENERATEPASSWORD MINLENGTH="number" MAXLENGTH="number" RESULTVARIABLE="text" />

See Also

Block Input | Generate Password | Lock Workstation | Log Off | Restart | Shut Down | Suspend/Hibernate | Empty Recycle Bin | End Process | Change Printer | Print | Set Date and Time | Run

Security - Generate Password

Declaration

<AMGENERATEPASSWORD MINLENGTH="number" MAXLENGTH="number" RESULTVARIABLE="text" />

See Also

Block Input | Generate Password | Lock Workstation | Log Off | Restart | Shut Down | Suspend/Hibernate | Empty Recycle Bin | End Process | Change Printer | Print | Set Date and Time | Run

Description

Generates a random string password using any possible printable character between the specified minimum and maximum sizes and stores it as an Automate variable. This string conforms to the standard for strong passwords.

Description

Generates a random string password based on character sets or patterns and populates an AutoMate variable with the results. This string conforms to the standard for strong passwords.

Practical Usage

Used to build a strong password.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Min length

Number

Yes

(Empty)

MINLENGTH="7"

Specifies the minimum length of characters that will be used to generate the password.

Max length

Number

Yes

(Empty)

MAXLENGTH="11"

Specifies the maximum length of characters that will be used to generate the password.

Populate variable with password

Text

Yes

(Empty)

RESULTVARIABLE="varname"

Specifies an existing variable to populate with the newly generated password.

Parameters

Password Properties

Property

Type

Req'd

Default

Markup

Description

Generate password using

Text (options)

Yes

Character set

GENERATEUSING="pattern"

Specifies the password generation method. Different parameters apply depending on which method is selected. The available options are:

  • Character Sets - Allows you to select which characters can be used (i.e. upper-case letters, digits, special characters...) and AutoMate will randomly pick characters out of the set. To define a character set, simply tick the appropriate check box of commonly used ranges of characters (shown below). This method is the recommended way to generate random passwords.

  • Pattern - Password generation is based on patterns. A pattern is a string defining the layout of the new password. More details on pattern-based password generation can be found below under Additional Notes.

Upper case (A,B,C,...)

Yes/No

No

Yes

UPPDERCASE="no"

If set to YES, upper case characters (i.e. A,B,C,D,E,F,G,...) will be included during password generation. If set to NO, upper case characters will not be included (set to YES by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Lower case (a,b,c,...)

Yes/No

No

Yes

LOWERCASE="no"

If set to YES, lower case characters (i.e. t,u,v,w,x,y,z,....) will be included during password generation. If set to NO, lower case characters will not be included (set to YES by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Digits (1,2,3,...)

Yes/No

No

Yes

DIGITS="no"

If set to YES, digits (i.e. 1,2,3,4,5,6,7,8,9,0) will be included during password generation. If set to NO, digits will not be included (set to YES by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Minus (-)

Yes/No

No

No

MINUS="yes"

If set to YES, a minus (-) sign will be included during password generation. If set to NO, a minus sign will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Underline (_)

Yes/No

No

No

UNDERLINE="yes"

If set to YES, an underline (_) will be included during password generation. If set to NO, an underline will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Space( )

Yes/No

No

No

SPACE="yes"

If set to YES, a space ( ) will be included during password generation. If set to NO, a space will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Special (!,$,%,...)

Yes/No

No

No

SPECIAL="yes"

If set to YES, special characters (i.e. !,",#,$,%,&,*,...) will be included during password generation. If set to NO, special characters will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Brackets ([,],{,},<,>,...)

Yes/No

No

No

BRACKETS="yes"

If set to YES, brackets (i.e. (,),[,],{,},<,>) will be included during password generation. If set to NO, brackets will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

High ANSI characters

Yes/No

No

No

HIGHANSI="yes"

If set to YES, high ANSI characters from '~' to U255 (excluding U255) will be included during password generation. If set to NO, high ANSI characters will not be included (set to NO by default). This parameter is available only if the Generate password using parameter is set to Character sets.

Also include the following characters

Text

No

(Empty)

INCLUDE="assas"

Specifies characters you wish to add manually in addition to the predefined character ranges. All characters that you enter in this edit box will be directly added to the character set.  AutoMate will 'optimize' your character set by removing all duplicate characters. For example, if you enter 'AAAAB'  into this edit box, this results as 'AB'.

Length of generated password

Number

Yes

8

LENGTH="10"

The length (in characters) of the password to generate.

Max length

Number

Yes

(Empty)

MAXLENGTH="11"

Specifies the maximum length of characters that will be used to generate the password.

Pattern (text box)

Text

Yes

(Empty)

PATTERN="ABCdefg$%()"

The character pattern(s) in which to include in the password generation. This parameter is available only if the Generate password using parameter is set to Pattern. More details on pattern-based password generation can be found below under Additional Notes.

Randomly permute characters of password

Yes/No

No

No

PERMUTE="yes"

If set to YES, sets a random permutation on the characters used to generate the password. This uses a pattern generation feature that can be used to generate passwords that follow certain rules (set to NO by default). This parameter is available only if the Generate password using parameter is set to Pattern.

Populate variable with the password

Text

Yes

(Empty)

RESULTVARIABLE="thepass"

The name of an existing variable in which to populate with the newly generated password.

 

Advanced Properties

Property

Type

Req'd

Default

Markup

Description

Each character must occur at most once

Yes/No

No

No

NOREPEATINGCHARS="yes"

If set to YES, characters should not be repeated during password generation. Set to NO by default.

Exclude look alike characters

Yes/No

No

No

EXCLUDELOOKALIKE="yes"

If set to YES, look alike characters (i.e. 1l,0O) should be excluded during password generation. Set to NO by default.

Exclude the following characters

Text

No

(Empty)

EXCLUDE="qp@$z"

Specifies the characters to exclude from password generation.

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Password Generation Based on Patterns

AutoMate can create passwords using patterns. A pattern is a string defining the layout of the new password. The following placeholders are supported:

Placeholder

Type

Character Set

a

Lower-Case Alphanumeric

abcdefghijklmnopqrstuvwxyz 0123456789

A

Mixed-Case Alphanumeric

ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789

U

Upper-Case Alphanumeric

ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

c

Lower-Case Consonant

bcdfghjklmnpqrstvwxyz

C

Mixed-Case Consonant

BCDFGHJKLMNPQRSTVWXYZ bcdfghjklmnpqrstvwxyz

z

Upper-Case Consonant

BCDFGHJKLMNPQRSTVWXYZ

d

Digit

0123456789

h

Lower-Case Hex Character

0123456789 abcdef

H

Upper-Case Hex Character

0123456789 ABCDEF

l

Lower-Case Letter

abcdefghijklmnopqrstuvwxyz

L

Mixed-Case Letter

ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz

u

Upper-Case Letter

ABCDEFGHIJKLMNOPQRSTUVWXYZ

p

Punctuation

,.;:

b

Bracket

()[]{}<>

s

Printable 7-Bit Special Character

!"#$%&'()*+,-./:;<=>?[\]^_{|}~

S

Printable 7-Bit ASCII

A-Z, a-z, 0-9, !"#$%&'()*+,-./:;<=>?[\]^_{|}~

v

Lower-Case Vowel

aeiou

V

Mixed-Case Vowel

AEIOU aeiou

Z

Upper-Case Vowel

AEIOU

x

High ANSI

From '~' to U255 (excluding U255)

\

Escape (Fixed Char)

Use following character as is

{n}

Escape (Repeat)

Repeat the previous character n times

[...]

Custom Char Set

Define a custom character set

 

The \ placeholder is special: it's an escape character. The next character that follows the \ is written directly into the generated password. If you want a \ in your password at a specific place, you must to enter \\.

Using the {n} code you can define how many times the previous placeholder should occur. The { } operator duplicates placeholders, not generated characters. Examples:

The [...] notation can be used to define a custom character set, from which the password generator will pick one character randomly. All characters between the '[' and ']' brackets follow the same rules as the placeholders above. Examples:

More examples:

ddddd

Generates for example: 41922, 12733, 43960, 07660, 12390, 74680, ...

\H\e\x\:\ HHHHHH

Generates for example: 'Hex: 13567A', 'Hex: A6B99D', 'Hex: 02243C', ...

Common password patterns

Below are a few examples how the pattern generation feature can be used to generate passwords that follow certain rules.

Name

Pattern

WEP Hex Key - 40 Bit

h{10}

WEP Hex Key - 128 Bit

h{32}

WEP Hex Key - 256 Bit

h{64}

Random MAC Address

HH\-HH\-HH\-HH\-HH\-HH

 

Below are a few examples how the pattern generation feature can be used to generate passwords that follow certain rules.

NOTE: For all of the following examples you must enable the Randomly permute characters of password option.

 

Rule

Pattern

Must consist of 2 upper case, 2 lower case characters and 2 digits

uulldd

Must consist of 9 digits and 1 letter

d{9}L

Must consist of 10 alphanumeric characters, where at least 1 is a letter and at least 1 is a digit

LdA{8}

Must consist of 10 alphanumeric characters, where at least 2 are upper case and at least are 2 lower case characters

uullA{6}

Must consist of 9 characters out of the set "ABCDEF" and an '@' symbol somewhere in it

\@[\A\B\C\D\E\F]{9}

Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Generate a random password and store it in variable "theNewPassword". Minimum password length is 6. Maximum password length is 12.

 

<AMGENERATEPASSWORD MINLENGTH="6" MAXLENGTH="12" RESULTVARIABLE="theNewPassword" />

 

↑ Top of Page