Commands
Top  Previous  Next


There are four script sections in which commands can be used; [Init], [Batch], [Undo] and [OnError].

Help shortcut: press F1 in the SetupBatcher script editor to open the help topic for the command next to the cursor position.

Command type

The command type indicates where in a script a command can be used. Some commands can only be used in certain sections and some commands that uses data from the [Data] section must be placed in a Data.Loop..EndLoop statement.

Type
Command section
0
All - [Init], [Batch], [Undo] and [OnError]
1
[Batch]
2
[Batch], inside Data.Loop..EndLoop statement
3
[Undo]
4
[Undo], inside Data.Loop..EndLoop statement
10
[Init]
11
[Init], inside Data.Loop..EndLoop statement
20
[Batch], [Undo] and [Init]
21
[Batch], [Undo] and [Init], inside Data.Loop..EndLoop statement



Active Directory

The Active Directory commands manages Windows 2000 and 2003 server groups, accounts, containers and organizational units. Refers to objects by Active Directory path.

Command
Type
Description
AD.Account.CopyGroups
0
Copies group membership from one account to another
AD.Account.CopyProperties
0
Copies specified properties from one user account to another
AD.Account.Create
2
Creates global user account
AD.Account.Delete
4
Deletes global user account
AD.Account.SetGroups
0
Sets or edits user account group membership
AD.Account.SetPassword
2
Sets global user account password
AD.Account.SetProperty
0
Sets or edits global user account properties
AD.Contact.Create
2
Creates contact
AD.Contact.Delete
4
Deletes contact
AD.Group.AddObject
0
Adds objects (groups, users) to a group
AD.Group.Create
0
Creates group
AD.Group.Delete
0
Deletes group
AD.Group.RemoveAllObjects
0
Removes all members from a group
AD.Group.RemoveObject
0
Removes objects (groups, users) from a group
AD.Group.SetMembers
0
Sets or edits an entire group member list from the contents of a text file
AD.OU.Create
0
Creates organizational unit
AD.OU.Delete
3
Deletes organizational unit
AD.OU.MoveObject
0
Moves objects (groups, users) between organizational units / containers


Related topics
·About Windows 2000 server account names  
·SamAccount commands vs. AD commands  

Data section

The data section commands fills the [Data] section with data, manages the data, displays it, prints it and saves it.

Command
Type
Description
$GetDataFiles
-
Gets and processes one or many data files from an email POP3 server, an FTP server or a local directory.
Data.Column.Check
10
Checks that the text in a column of the [Data] section contains valid characters and has valid length
Data.Column.DupeCheck
10
Compares the text in a column of the [Data] section with existing user or mailbox data. If duplicates are found - stop, add trailing number or prompt. Also possible to prohibit "forbidden" character combinations. Example: create unique user names and email addresses.
Data.Column.Fill
0
Fills a column of the [Data] section with a string
Data.Column.ReplaceText
10
Replaces text in a column of the [Data] section
Data.Connect.xData
20
Connects data in the [Data] section with data in an [xData] section by row numbers
Data.Copy.xData
20
Copies data from an [xData] section to the [Data] section if a criteria is met
Data.Clear
20
Clears the [Data] section
Data.Get.AD
0
Fills the [Data] section with data from Active Directory / Exchange 2003 or 2000 server / Exchange 5.5 server
Data.Get.AD.Find
0
Searches Active Directory and fills the [Data] section with any combination of properties for matching objects
Data.Get.FileList
10
Fills the [Data] section with file details from a disk directory
Data.Get.LD.Find
0
Searches Linux Directory and fills the [Data] section with any combination of properties for matching objects
Data.Get.ND
0
Fills the [Data] section with data from Novell Directory
Data.Get.ND.Find
0
Searches Novell Directory and fills the [Data] section with any combination of properties for matching objects
Data.Get.SAM
10
Fills the [Data] section with account data from an NT4 server or XP / 2000 / NT workstation
Data.Get.SAM.PasswordHashes
10
Extracts password hashes from an NT4, 2000 or 2003 server
Data.Insert
20
Inserts a new row with a string in a specified column into the [Data] section
Data.Load
10
Fills the [Data] section with data from a text file
Data.Loop..EndLoop
20
Loops through enclosed commands once for each row in the [Data] section and provides access to the [Data] section through variables
Data.NextLoop
21
Proceeds to next loop in Data.Loop..EndLoop statement - ignore rest of commands and continue with next [Data] section row
Data.Passwords.Generate
10
Runs the password generator
Data.PrintRow
2
Prints a paper with data from the current [Data] row inserted in a template. Example: password sheets
Data.Row.Delete
11
Deletes the current [Data] row
Data.Save
0
Saves the current [Data] section
Data.Series.Generate
10
Clears the [Data] section and generates a number series in specified column
Data.Show
0
Displays the [Data] section in a preview dialog, possible to abort or continue before the actual script starts
Data.Show.Filter
0
Same as Data.Show, but with the ability to show rows filtered by a column
Data.Usernames.Generate
10
Runs the SamAccount name generator
Data.Write
21
Writes to the current [Data] row
xData.Load
0
Fills an [xData] section with data from a text file
xData.Loop..EndLoop
0
Extra Data.Loop..EndLoop statements with corresponding extra data sections
xData.Save
0
Saves an [xData] section to a text file


Disk quota

Command
Type
Description
DiskQuota.Remove
4
Removes disk quota on a Windows 2000 or 2003 NTFS volume for a user
DiskQuota.Set
2
Sets disk quota on a Windows 2000 or 2003 NTFS volume for a user


Event log

Command
Type
Description
EventLog.Backup
0
Backups an event log
EventLog.Clear
0
Clears an event log
EventLog.Write
0
Writes to the application event log on the local machine


Exchange 2000

The Exchange 2000 and 2003 server commands manages mailboxes, distribution lists and instant messaging. Refers to objects by Active Directory path.

Command
Type
Description
Exchange.2k.Features
0
Performs various odd Exchange 2000 or 2003 operations
Exchange.2k.Group.SetProperty
0
Mail enables or disables group (distribution list)
Exchange.2k.Mailbox.Create
2
Creates Exchange 2000 or 2003 mailbox
Exchange.2k.Mailbox.Delete
4
Deletes Exchange 2000 or 2003 mailbox
Exchange.2k.Mailbox.SetProperty
2
Sets / edits Exchange 2000 or 2003 mailbox properties


Related commands
·Active directory commands  
·Data.Get.AD  

Exchange 5.5

The Exchange 5.5 server commands manages mailboxes and distribution lists. Refers to objects by Exchange 5.5 container path.

Command
Type
Description
Exchange.55.DL
0
Adds / removes mailboxes from Exchange 5.5 distribution list
Exchange.55.Mailbox.Create
2
Creates Exchange 5.5 mailbox
Exchange.55.Mailbox.Delete
4
Deletes Exchange 5.5 mailbox
Exchange.55.Mailbox.SetProperty
0
Sets / edits Exchange 5.5 mailbox properties


Related commands
·Data.Get.AD  

General

Command
Type
Description
Delay
0
Waits until specified time interval elapses
DOS
0
Executes DOS command or other program on the local machine
DOSR
0
Executes DOS command or other program on a remote NT / 2000 / XP / 2003 machine
GoSub
0
Jumps to a subroutine (subsection)
If..Then..Else..EndIf
0
If expression is true, then the commands (rows) between then and endif are executed
Inc
0
Adds one (1) to a numerical variable
LastError.Clear
0
Clears the last error code and message
Logoff
0
Use logoff to logoff after a LogonAs command
LogonAs
0
Logon to a remote machine on which the Administrator account under which SetupBatcher is executed has no privileges. Example: machines in other domain without trust, workgroup workstation.
LogWindow.Write
0
Writes a message to the log window
MessageBox
0
Displays a message dialog
QuitBatch
0
Quits current batch job
RaiseError
0
Throws an error with specified error code and message
SaveScript
0
Saves current script
SET
0
Initializes a variable
System.Reboot
0
Reboots a machine
System.Shutdown
0
Shuts down a machine
Wait.Process
0
Waits for a remote process to finish
VBScript.Begin..End
0
Use the VBScript.Begin..End structure to run VBScript commands


IIS 4.0 / 5.0 / 6.0

Command
Type
Description
IIS.VirtualDir.Create
2
Creates FTP or web virtual directory on IIS 4.0, 5.0 and 6.0
IIS.VirtualDir.Delete
4
Deletes FTP or web virtual directory on IIS 4.0, 5.0 and 6.0
IIS.VirtualDir.SetProperty
2
Sets or edits web or FTP virtual directory properties on IIS 4.0, 5.0 and 6.0


Linux

Command
Type
Description
Lin.DS.Group.AddObject
0
Adds Linux user object to supplementary group
Lin.DS.Group.Create
0
Creates Linux group
Lin.DS.Group.RemoveObject
0
Removes Linux user object from supplementary group
Lin.DS.Logon
0
Logon to Linux LDAP server, all subsequent Linux commands will be carried out on this connection
Lin.DS.Object.Delete
0
Deletes Linux object (user, group, container)
Lin.DS.Op.Commit
0
Executes Linux object operation
Lin.DS.Op.Init
0
Initializes Linux object (user, group, container) operation (create, modify, set password)
Lin.DS.Op.SetProperty
0
Sets or edits Linux object operation properties
Lin.DS.OU.Create
0
Creates Linux organizational unit
Lin.DS.OU.MoveObject
0
Moves Linux object (user, group) between organizational units and/or renames object
Lin.SSH.Command
0
Executes Linux secure shell command
Lin.SSH.Logon
0
Logon to Linux secure shell, all subsequent Linux secure shell commands will be carried out on this connection


Novell NetWare / GroupWise

Command
Type
Description
Nov.DS.Account.Create
2
Creates NetWare user account
Nov.DS.Account.Delete
4
Deletes NetWare user account
Nov.DS.Account.SetPassword
2
Sets NetWare user account password
Nov.DS.Alias.Create
0
Creates NetWare alias
Nov.DS.Alias.Delete
0
Deletes NetWare alias
Nov.DS.Group.AddObject
0
Adds NetWare object (group, user) to a group
Nov.DS.Group.Create
0
Creates NetWare group
Nov.DS.Group.Delete
0
Deletes NetWare group
Nov.DS.Group.RemoveAllObjects
0
Removes all members from a NetWare group
Nov.DS.Group.RemoveObject
0
Removes NetWare object (group, user) from a group
Nov.DS.Object.AddTrustee
0
Adds a trustee to a NetWare object
Nov.DS.Object.CopyGroupMembership
0
Copies group membership from one NetWare object to another
Nov.DS.Object.CopyProperties
0
Copies specified properties from one NetWare object to another
Nov.DS.Object.Rename
0
Renames NetWare object
Nov.DS.Object.SetGroups
0
Sets or edits NetWare object group membership
Nov.DS.Object.SetProperty
0
Sets or edits NetWare object (user, group, container etc.) properties
Nov.DS.OU.Create
0
Creates NetWare organizational unit
Nov.DS.OU.Delete
0
Deletes NetWare organizational unit
Nov.DS.OU.MoveObject
0
Moves NetWare object (group, user) between organizational units
Nov.GW.Account.Create
2
Creates GroupWise user account for a user with an existing NetWare account
Nov.GW.Account.Delete
4
Deletes GroupWise user account
Nov.GW.Account.Reconnect
0
Reconnects GroupWise user account with NetWare user account after NetWare user account move or rename
Nov.GW.Account.Rename
0
Renames GroupWise user account
Nov.GW.Account.SetPassword
2
Sets GroupWise user account password
Nov.GW.Account.SetProperty
0
Sets or edits GroupWise account properties
Nov.GW.DL.AddObject
0
Adds GroupWise account to distribution list
Nov.GW.DL.Create
0
Creates GroupWise distribution list
Nov.GW.DL.Delete
0
Deletes GroupWise distribution list
Nov.GW.DL.RemoveObject
0
Removes GroupWise account from distribution list
Nov.LDAP.Logon
0
Logon to Novell LDAP server, all subsequent Nov.LDAP.SetSimplePassword commands will be carried out on this connection
Nov.LDAP.SetSimplePassword
0
Sets NetWare simple password (hash)
Nov.Vol.AddTrustee
0
Adds a trustee to a NetWare volume
Nov.Vol.RemoveTrustee
0
Removes a trustee from a NetWare volume
Nov.Vol.SizeLimit
0
Sets a space limit on a NetWare volume subdirectory
Nov.Vol.Quota.Remove
0
Removes disk quota on a NetWare volume for a user or a group
Nov.Vol.Quota.Set
0
Sets disk quota on a NetWare volume for a user or a group


Registry

Command
Type
Description
Registry.Delete
0
Deletes registry value
Registry.Write
0
Adds or edits registry value
Registry.Key.Create
0
Creates registry key
Registry.Key.Delete
0
Deletes registry key (also possible to delete all subkeys)


SamAccount

The SamAccount commands manages server or workstation accounts and groups. Refers to objects by SamAccount name. Most commands works on all NT versions, from NT 3.51 workstation / server, 2000 workstation / server up to XP workstation. On Windows 2000 or 2003 server you probably want to use
Active Directory commands instead.

Command
Type
Description
Account.Create
2
Creates server or workstation user account
Account.Delete
4
Deletes server or workstation user account
Account.Edit
2
Modifies server or workstation user account properties, except password
Account.Edit.Password
2
Changes server or workstation user account password
Account.Edit.PasswordHashes
0
Sets or edits Windows NT4, 2000 or 2003 server user account password hashes
Account.Rename
2
Renames server or workstation user account
Account.Set.Group.Global
2
Sets / edits user account global group membership
Account.Set.Group.Local
2
Sets / edits user account local group membership
Account.Set.RAS
2
Sets / edits user account RAS properties
Group.AccountAdd
0
Adds user account to global or local group
Group.AccountRemove
0
Removes user account from global or local group
Group.Delete
4
Deletes global or local group
Group.Global.Create
0
Creates global group
Group.Local.AddGlobal
0
Adds global group to local group
Group.Local.Create
0
Creates local group
Group.SetProperty
0
Renames a group or changes description for a group
WTS.UserConfig.SetProperty
2
Sets / edits terminal server properties


Related topics
·SamAccount commands vs. AD commands  

Service

Command
Type
Description
Service.Admin.Stop
0
Stops the remote admin service
Service.Control
0
Starts or stops a service or sets startup mode
Service.SetLogon
0
Changes service account / password