Unicenter Desktop DNA Command Language Reference Guide

waisttherapeuticSoftware and s/w Development

Nov 4, 2013 (3 years and 9 months ago)

110 views

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





1








_____________________




Unicenter Desktop DNA
Command Language
Reference Guide

_____________________




All rights reserved. Reproducing or using editorial or pictorial content is prohibited without express
per
mission. Every attempt is made to keep the information in this guide accurate and complete. However,
Computer Associates does not assume responsibility for errors or omissions, or for incidental for
consequential damage arising from its use. Trademark name
s are used throughout this guide. Rather than
putting a trademark symbol after every occurrence of a trademarked name, we use the names for editorial
purposes only, to the benefit of the trademark owner, with no intent to infringe on the trademark.

Copyrig
ht 200
6

by
Computer Assoc
iates, Inc
. All rights reserved.

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





2

OVERVIEW

6

Section descriptions

6

Software tools

7

DNA Studio

7

Unicenter Desktop DNA

7

Prerequisites

7

Related documentation

7

DEVELOPING DNA SCRIP
TS

8

Writing the script

8

Command language syntax

9

Comments

9

Punctuation

9

Wildcards, conditional statements and loops

10

Script writing terminology

10

Commands

10

Constants

10

Keywords

11

Variables

11

Operators

11

CONSTANTS AND KEYWOR
DS

12

Gene
ral Constants

12

ALWAYS

12

APPLICATIONPATH

12

DETAILED

12

GENERAL

12

LANGUAGE

12

NEVER

12

MODERATE

12

NEW_APPLICATIONPATH

13

NEW_SYSTEMPATH

13

NEW_WINDOWSPATH

13

NEWER

13

SYSTEMPATH

13

VERY_DE
TAILED

13

WIN2000

13

WIN95

13

WIN98

13

WINME

13

WINNT

13

WINDOWSPATH

13

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





3

Registry Related Constants

13

APPDATAPATH

13

DESKTOPPATH

13

FAVORITESPATH

13

LOCALAPPDATAPATH

14

PERSONALPATH

14

PROGRAM
SPATH

14

STARTMENUPATH

14

STARTUPPATH

14

TEMPLATESPATH

14

NEW_APPDATAPATH

14

NEW_DESKTOPPATH

14

NEW_FAVORITESPATH

14

NEW_LOCALAPPDATAPATH

14

NEW_PERSONALPATH

14

NEW_PROGRAMSPATH

14

NEW_STARTMENUPATH

14

NEW_STARTUPPATH

14

NEW_TEMPLATESPATH

14

Machine Related Constants

15

SOURCE

15

DESTINATION

15

Keywords

15

GENERAL COMMANDS

19

break

19

Detect

19

DirectoryExists

20

EnumDirectories

20

EnumFiles

21

EnumKey

21

EnumValue

22

Exit

22

Execute

23

FileExists

23

GetPlatform

24

IsLikeNT

24

KeyExists

25

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





4

Message

25

Print

25

PrintException

26

RestartRequired

26

RetrieveValue

27

return

27

ValueExists

28

DETECTION COMMANDS

29

Detect

29

Option

29

STORE COMMANDS

31

StoreDirectory

31

StoreFile

31

StoreKey

31

StoreMa
ppedFile

32

StoreMappedKey

32

StoreMappedValue

32

StoreMappedSub
Keys

33

StoreSubKeys

33

StoreValue

34

APPLY COMMANDS

35

ApplyFile

35

ApplyDirectory

35

ApplyKey

36

ApplyMappedFile

36

ApplyMappedValue

37

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





5

ApplyMappedKey

38

ApplyMappedSubKeys

38

ApplySubKeys

39

ApplyValue

39

DeleteKey

40

DeleteValue

40

GetMappedPath

41

Map
Path

41

SetKey

42

SetValue

42

CONVERTING OLD SCRIP
TS TO DNA JAVA
SCRIPT:

44























Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





6

Overview


Unicenter
Desktop DNA is the comprehensive application from
Computer Associates

that allows

you to
automate the
p
rocess of migrating system settings and/or applications and

their s
ettings and data.
Unicenter
Desktop DNA

uses scripts written in a proprietary command

language to perform a set of Windows
functions to accomplish these migrations.

Many executable scripts come standard when
Unicenter
Desktop
DNA is shipped, and more

scrip
ts readily become ava
ilable on the Computer Associates
’ web site.
However, it is

also possible for users to create their own custom scripts for use with
Unicenter
Desktop

DNA. Typically, the user who wants to learn scrip
t writing is doing so because
he

wan
ts a custom script
that can move an application and its settings to one or more

systems in the company, to upgrade an
application and its
s
ettings to multiple

systems throughout the company, or to migrate/install custom
applications. This

r
eference guide l
ists the commands and their
d
escriptions, their syntax, and their

parameter definitions for creating custom scripts using
Computer Associates
’ script

writing process.
Examples are given throughout the guide.

Other elements of the command language, such as
keywords,
constants, and

operators, are also listed in this guide.

Computer Associates

offers a three
-
day training
course on script writing, which makes

extensive use of this guide. On
-
site or
i
ndividualized self
-
instructed
script writing

training can also

be well
-
served by use of this reference guide.




Section

descriptions




Elements of the Command Language
describes the important

elements of the command language,
and the specific terminology and concepts

required for writing scripts.





Constants and Keyw
ords
lists the constants and keywords that can

be used in the script writing command language.





General Commands
describes the general commands that can be

used in any function of a
Unicenter Desktop DNA

script. This

section

includes syntax,

parameters, a
nd examples.





Detection Commands
describes the detection commands that can be

used only in Detect
Functions of a
Unicenter Desktop DNA

script.
This section

includes

syntax, parameters, and
examples.





Store Commands
describes the store commands that can b
e used

only in Store Functions of a
Unicenter Desktop DNA
.
This section

includes syntax,

parameters, and examples.





Apply Commands
describes the apply commands that can be used

only in Apply Functions of a
Unicenter Desktop DNA

script.
This section

includ
es

syntax, parameters, and examples.





Validate Commands
describes the commands that can be used in

Validation Functions of a
Unicenter Desktop DNA

script.





Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





7


Software tools


Computer Associates

provides
Unicenter Desktop DNA

and DNA Studio on the softwa
re distribution CD.
Both applications are used for creating custom scripts. This section briefly describes these tools.


DNA Studio


DNA Studio, the high
-
performance text editor for the PC, makes it easy to write custom scripts for
Unicenter Desktop DNA
. D
NA Studio is provided by
Computer Associates

on the
Unicenter Desktop DNA

distribution CD. Any text editor on the PC can be used for creating scripts; however, the features of DNA
Studio are designed specifically for writing custom Desktop DNA scripts.


Un
icenter
Desktop DNA


Unicenter Desktop DNA

is the application that uses your compiled script to accomplish a system or
application migration, or an application installation.




Prerequisites


Users writing custom scripts for
Unicenter Desktop DNA

should be

familiar with their PC and its Windows
operating system, as well as
Unicenter Desktop DNA
. It is also helpful if the script writer has had some
experience with a modern programming language, but that is not required.


Related documentation


This reference

guide consists of elements of the script writing command language in use by
Computer
Associates
. Other documentation that can be useful includes:




DNA Studio User’s Guide



Unicenter
Desktop DNA User’s Guide



Script Writing Training Guide


Each of these manu
als can be obtained from
Computer Associates
.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





8

Developing
DNA Scripts


Unicenter Desktop DNA

scripts are programs written using a
modified version of the JavaScript 1.5
scripting
language.

The terminology used in these scripts and in the script

writing pr
ocess is similar to
JavaScript
, but at the same time

includes elements specific to
Unicenter Desktop DNA

from
Computer
Associates
.

This section

describes the important elements of the
scripting
language, and the

specific
terminology and concepts required f
or writing scripts.


Unicenter Desktop DNA

scripts use the full Core JavaScript 1.5 language with addition of custom
commands specific to
Unicenter Desktop DNA
.


For complete
documentation of Core
JavaScript 1.5 see:



http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide




Writing the script


There are four basic components (or sections) of a
Unicenter Desktop DNA

script

and you

can also add
other sections using General commands. For example, you can add a

section to set global variables at the
beginning of your script.

The basic components of a
Unicenter Desktop DNA

script, shown below, occur
within the

script in the logical order presented here:





Detection Function
-

Every script must have a Detection Function to verify that

the application for
the script exists on the

source machine. The Detection Function

can also contain statements to
display options for the user to select and

then uses these selections to associate them with their
corresponding Store,

Apply and Validate Functions.




Store Functions
-

The Store Functi
ons specify which keys, key values and files

to retrieve from the
source machine. This data is then used in the Apply Functions.

Only store and general commands
can occur in Store Functions.




Apply Functions
-

The Apply Functions write the key, key values
and files to

the destination. Only
values that were stored in the Store Functions can be

applied in the Apply Functions. Only apply
and general commands can occur

in the Apply Functions.




Validate Functions
-

The Validate Functions check for overwrites and

conflicts.

Warnings can be
written to the validate log for display to the user. Only general

commands can occur in the
Validate
F
unctions








Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





9


Command language syntax


The DNA
Script
ing

language

is a superset of the JavaScript 1.5 programming language
.

DNA Studio
includes an easy to use syntax checker. When you syntax

check your scripts frequently, errors are easier to
find and correct. Figure 2
-
1 shows

a small part of a script.



Note:

Syntax conventions used in this manual include the following:


Angl
e brackets < and > indicate required parameters.


Square brackets [ and ] indicate optional parameters.


Parameters are listed in the order they must appear in commands.


Figure 2
-
1.
Sample Code Snippet


// User defined functions consist of the keyword
f
un
ction,

// the name of the function, and parentheses.

/*It is always a good idea to include comments within */

/* your script to describe the purpose of each function.*/

f
unction

StoreMySettings
()

{


// the name of the function, and parentheses.

StoreKey
(“
H
KCU
\
\
Software
\
\
ComputerAssociates
”)
;

}



Comments


Comment lines inserted into your script for documentation or other purposes can be

of two types:
surrounded by the forward slash
-
asterisk combination or with the use

of double forward slashes at the start
of each line. Comments can

follow the semicolon on the same line, and they cannot be nested.


By default, DNA Studio color codes comment lines in green. The user can

customize the color choice to
their liking.




Punctuation


As with most programming langu
ages, strict rules apply to punctuation within the

command language
script. When you try to correct errors found by the syntax

checker in DNA Studio, a careful review of the
following rules is usually all that is

needed for quick resolution:




Parentheses c
ome in pairs ( ).



Parameter strings are enclosed in double
-
quotes (“ “).

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





10



Parameters are separated by commas: “parameter1”, “parameter2”.



Comma placeholders are required for parameters: “parameter1”, ”” ,

“parameter3”.



Required parameters that are unused re
quire the NULL (““) placeholder.



Keywords are case sensitive: Detect is
not equal
to detect.



Functions require a set of curly braces: { and }.



Conditional statements (
if...else
and
while
loops) require a set of curly braces:

{ and }.



Spaces are unimportant

except as separators between words.



The NULL parameter is designated by the open and close double
-
quotes with

no space (“”).



String values are enclosed in double
-
quotes: “string value”.





Wildcards, conditional statements and loops


The asterisk wildcar
d (*) is allowed in all file specifications in a
Unicenter Desktop DNA

script.
For
example, the asterisk in the following command specifies that all files and folders with the
.txt
extension
within the
temp
folder will be stored.


Store
File
s (“c:
\
\
temp
\
\
*.
txt”);


The
if . . . else

and the
while

loop statements make up a large portion of the

processing flow in a
Unicenter
Desktop DNA

script. You can find many examples of these

statements in the
remaining

sections

of this
reference guide.


Script writing term
inology


Terminology and concepts specific to writing
Unicenter Desktop DNA

scripts using
the DNA scripting
language are described in this section.


Commands


Computer Associates

has extended the JavaScript
language
with its own proprietary commands speci
fic
for Unicenter Desktop DNA
. Each of the four basic sections of a script has their own set of

commands that
can be used within the section. For example, Apply commands can

only occur in the Apply section. There
is also a set of General commands that can

be used in any of the script sections.

Basic JavaScript objects
and functions can also be used anywhere in a script.


Constants


Constants are predefined or dynamically defined
values
provided by the script

interpreter. In general,
constants refer to a pat
h, a language identifier, a platform, or

an overwrite method. Their values depend on
the state of the interpreter and its

platform. Constants cannot be modified by the script, and retain the same
value for

the duration of the session
.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





11


Keywords


Keywords,

color coded in blue in Figure2
-
1, are case sensitive.
The user can

customize the color choice of
keywords in DNA Studio. All keywords are listed in

the
Command Language Reference Guide
.


Variables


The script writer defines variables to hold data values.
These variables can be

global and can be used in all
functions, or locally defined to be used in a single

function. Once defined, a variable becomes a reserved
word in the context of that

script.

Variables can be any combination of letters, numbers and und
erscores but
the first

character must be an alphanumeric letter. Variables cannot use the names of

keywords or
constants.


Operators


Usage examples of each of the script operators are shown throughout this reference

example.

The following operators
are th
e most commonly used in scripts. Please refer to JavaScript 1.5
documentation for a complete list of operators.



=
The assignment operator assigns the right
-
hand value to the left
-
hand

variable.



=
=
This comparison operator compares the left
-
hand variable or

string to

the right
-
hand variable
or string. If they are equal, it returns a
1
or true.

If they are not equal, it returns
0
or false.



!=
This comparison operator compares the left
-
hand variable or string to

the right
-
hand variable or
string. If they are
n
ot
equal, it returns a
1
or

true. If they are equal, it returns 0 or false.



||

The logical
-
OR operator performs an inclusive
-
OR operation on its

operands. The result is 0 if
both operands have 0 values. If either

operand has a non
-
zero value, the result is

1. If the first
operand of a

logical
-
OR operation has a non
-
zero value, the second operand is not

evaluated. The
logical
-
OR operator can be upper or lower case.



&&

The logical
-
AND operator returns the value 1 if both operands have

non
-
zero values. If eith
er
operand is equal to 0, the result is 0. If the first

operand of a logical
-
AND operation is equal to 0,
the second operand is

not evaluated. The logical
-
AND operator can be upper or lower case.



+
The plus operator concatenates two string elements
, or add
s t
w
o numbers
.







Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





12

Constants and Keywords


The constants and keywords that can be used in command language

scripts for
Unicenter Desktop DNA
,
listed in alphabetical order, are described in

this
section
. All constants and keywords are case sensitive and
are reserved words. Reserved words cannot be used in

variables or as function names.


General
Constants


Constants are predefined
values

provided by
Unicenter Desktop DNA
.

Constants cannot be modified by the
script. All constants retain the

same value thro
ughout the script with two exceptions as noted in the

descriptions below.


ALWAYS

parameter constant, used in various commands, specifies to
always

overwrite
files.


APPLICATIONPATH

pathname of the
Application
folder on the source machine. This is

initiali
zed
automatically by
Unicenter Desktop DNA

using the Detect keyword.


DETAILED

constant for the
print level
parameter that specifies the third level of

importance within four
levels in the Print or PrintException commands.

The highest importance level is t
he first level, which takes
the keyword

GENERAL. Printed messages with the DETAILED keyword are

indented two tabs from the
left in the debug log. When you set your log

options in
Unicenter Desktop DNA

to Detailed, statements
that have been marked

with the
print level
parameters GENERAL, MODERATE and

DETAILED are
displayed.


GENERAL

constant for the
print level
parameter that specifies the first level of

importance within four
levels in the Print or PrintException
commands. This

is the highest importance lev
el. Printed messages with
the

GENERAL keyword appear at the far left in the debug log. When you

set your log options in
Unicenter
Desktop DNA

to General (the default), only

statements that have been marked with the
print level
parameter

GENERAL are display
ed.


LANGUAGE

a three
-
character string describing the unique language identifier. This is

equal to the
current language of the machine.


NEVER

parameter constant, used in various commands, specifies to
never

overwrite the existing file.


MODERATE

constant
for the
print level
parameter that specifies the second level of

importance within
four levels in the Print or PrintException commands.

The highest importance level is the first level, which
takes the keyword

GENERAL. Printed messages with the MODERATE key
word are

indented one tab from
the left in the debug log. When you set your log

options in
Unicenter Desktop DNA

to Moderate,
statements that have been

marked with the
print level
parameters GENERAL and MODERATE

are
displayed.







Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





13

NEW_APPLICATIONPATH

pat
hname of the
Application
folder on the destination machine.


NEW_SYSTEMPATH

pathname of the
System
folder on the destination machine.


NEW_WINDOWSPATH

pathname of the
Windows
folder on the destination machine.



NEWER

parameter constant, used in various co
mmands, specifies to only

overwrite files if the
overwriting file is
newer
than the existing file.


SYSTEMPATH

pathname of the
System
folder on the source machine. This is set

automatically by
Unicenter Desktop DNA

in the Detect Function.


VERY_DETAILED

co
nstant for the
print level
parameter that specifies the lowest level of

importance
within four levels in the Print or PrintException commands.

The highest importance level is the first level,
which takes the keyword

GENERAL. Printed messages with the VERY_
DETAILED keyword

are indented
three tabs from the left in the debug log. When you set your

log
butt
s in
Unicenter Desktop DNA

to
Very_Detailed, statements that have

been marked withVERY_DETAILED are displayed.


WIN2000

represents the Windows 2000 platform.


WIN95

represents the Windows 95 platform.


WIN98

represents the Windows 98 platform.


W
INME

represents the Windows
Millennium

platform.


WINNT

represents the Windows NT platform.


WINDOWSPATH

pathname of the
Windows
folder on the source machine. This is
set

automatically
by
Unicenter Desktop DNA

in the Detect Function.


Registry
Related Constants


The following constants are defined in the registry in


HKEY_CURRENT_USER
\
Software
\
Microsoft
\
Windows
\
CurrentVersion
\
Explorer
\
Shell Folders

. You
can specify the
se constants instead of retrieving the value from the registry.



APPDATAPATH

The path of the user Application Data on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
Application Data.


DESKTOPPATH

The path of the user Desktop folder on
the Source machine, such as C:
\
Documents
and Settings
\
Default User
\
Desktop.



FAVORITESPATH

The path of the user Favorites folder on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
Favorites.

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





14


LOCALAPPDATAPATH

The path of the user Applic
ation Data on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
Local Settings
\
Application Data.


PERSONALPATH

The path of the user My Documents on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
My Documents.


PROGRAMSP
ATH

The path of the user Program Files on the Source machine, such as C:
\
Program
Files.


STARTMENUPATH

The path of the user Start Menu folder on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
Start Menu.


STARTUPPATH

The path of the use
r Startup Folder on the Source machine, such as C:
\
Documents
and Settings
\
Default User
\
Start Menu
\
Programs
\
Startup.


TEMPLATESPATH

The path of the user Templates folder on the Source machine, such as
C:
\
Documents and Settings
\
Default User
\
Templates.


NEW_A
PPDATAPATH

The path of the user Application Data on the Destination machine, such as
C:
\
Documents and Settings
\
Default User
\
Application Data.


NEW_DESKTOPPATH

The path of the user Desktop folder on the Destination machine, such as
C:
\
Documents and Settings
\
Default User
\
Desktop.


NEW_FAVORITESPATH

The path of the user Favorites folder on the Destination machine, such as
C:
\
Documents and Settings
\
Default User
\
Favorites.


NEW_LOCALAPPDATAPATH

The path of the user Application Data on the Destination
machine, su
ch as C:
\
Documents and Settings
\
Default User
\
Local Settings
\
Application Data.


NEW_PERSONALPATH

The path of the user My Documents on the Destination machine, such as
C:
\
Documents and Settings
\
Default User
\
My Documents.


NEW_PROGRAMSPATH

The path of the use
r Program Files on the Destination machine, such as
C:
\
Program Files.


NEW_STARTMENUPATH

The path of the user Start Menu folder on the Destination machine,
such as C:
\
Documents and Settings
\
Default User
\
Start Menu.


NEW_STARTUPPATH

The path of the user Sta
rtup Folder on the Destination machine, such as
C:
\
Documents and Settings
\
Default User
\
Start Menu
\
Programs
\
Startup.


NEW_TEMPLATESPATH

The path of the user Templates folder on the Destination machine, such
as C:
\
Documents and Settings
\
Default User
\
Template
s.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





15

Machine
Related Constants


The following constants are used with these commands to

specify on what machine to get
data
:




DirectoryExists



FileExists



GetPlatform



IsLikeNT



KeyExists



RetrieveValue



ValueExists



The constants are as follows:



SOURCE

A constant that tells Desktop DNA to get data

from the Source “Old” Machine
.


DESTINATION

A constant that tells Desktop DNA to get data from the Destination “New” Machine
.

This constant only make sense when used in an Apply state.




Example
:


function MyS
toreFunction()

{

var strSourceDesktop = RetrieveValue("HKCU
\
\
Shell Folders", "Desktop", SOURCE);


// do something.

}


function MyApplyFunction()

{



var strSourceDesktop = RetrieveValue("HKCU
\
\
Shell Folders", "Desktop", SOURCE);




var strDestinationDeskto
p = RetrieveValue("HKCU
\
\
Shell Folders", "Desktop", DESTINATION);


// do something.

}


Keywords


In addition to all commands, which are by default, reserved words, the

following keywords are reserved
and have special meanings in the

command language. All k
eywords are case sensitive.







Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





16

Detection
denotes the detection function. This is the first function called by

Unicenter Desktop DNA
.
Only the Detect, Option
, and General

commands should

appear in this function.


Usage/Example:

function

Detection()

{

//
Detect

statement

// Option commands

}



false
represents ze
ro (0) in a Boolean expression.


Examples:

if (Detect(

winword.exe”) == false)

{

return;

}



f
unction
declares a function and must appear before any function

name. A function must be defined
before

it is called from within the

script.


Usage:

f
unction <Function Name>()

{

// statements

}


Example:

f
unction
MyStoreFunction
()

{

// store some stuff

}



if ... else
begins a conditional statement and starts the alternative statement.

These keywords are no
t case
sensitive.


Usage:

if (<condition>)

{

DoSomething();

}

else

{

DoSomethingElse();

}


Example:

if(CurrentVersion == ““)

return false;

else

return true;



#include
allows the main script file to include code from other files for easy code reuse. It is
also a good
practice to put all localizable strings in a special include file to make localization of the script easier.

Any
assigned variables in the

header file are inserted into the script’s global scope. The header file can

include
Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





17

functions that can b
e called from the script or from the interpreter.

Include files must contain appropriate
statements. The
include

statement
does not
end with a semicolon.


Parameter:

the file name (string value)


Usage:

#include

<file name>


Example:

#include “Script
Langua
geHeader
.
jsh




Language
returns the language

of the operating system
.



Usage/Example:

if(Language==”enu”)

{

// do something

}


PreProcess

Denotes the PreProcess function. This function is always called before any store functions.
In the case of a network

migration this function is called on the server. Only General commands are
allowed in this function.


Usage
:

function PreProcess()

{

// statements to run before any storing takes place

}


PostProcess

Denotes the PostProcess function. This function is alwa
ys called after all apply functions.
Only General commands are allowed in this function.


Usage:

function PostProcess()

{

// statements to run after all applying takes place

}



true
represents one (1) in a Boolean expression.


Examples:

if (Detect(

winwo
rd.exe”) ==

true)

{

return;

}





var

specifies that a variable is local only to the immediate scope. This allows for recursion in scripts.



Usage:

var
myLocalVariabl;

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





18


Example:

f
unction RecursionTest(strRecursionCount)

{

Print(“enter Recursion Test=“ +st
rRecursionCount);

if (strRecursionCount !=”xxxx”)

{

var strlfScope = strRecursionCount +”x”;

RecursionTest(strlfScope);

}

else

{

return;

}

Print(“leave RecursionTest = “+ strRecursionCount);

}


f
unction MyTestFunction()

{

RecursionTest(“x”);

}


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





19

General Co
mmands


The general commands that can be used in command language scripts

for
Unicenter Desktop DNA
, listed
in alphabetical order, are described in this

section
. All are case sensitive otherwise noted, and are reserved
words.

General commands can be used i
n any function.


break


Description
This command jumps the flow of control to the end of the immediate

loop and
executes the first instruction following the loop. This

command is only meaningful inside of a
loop.


Example:


var dirList = EnumDirectories("
C:
\
\
");

for (dirIdx in dirList)

{


var dir = dirList[dirIdx];


if (
dir
== “Special”)

{

StoreDirectory(“C:
\
\
” + dir);

break;

}

}


Detect


Description
This command specifies the application associated with the script, of

which there
can be only one. On the s
ource machine this command is

called from the Detection Function. On
the destination machine, it can

be called from anywhere in order to resolve the application path.
The

interpreter resolves the APPLICATIONPATH keyword, which is not

valid and should not b
e
used before Detect is called. For efficiency, the

script should call Detect in the Detection Function.


Syntax
Detect(<executable name>, [registry path]);


Parameters


executable
name
A

string value that is the executable name of the application. This v
alue

can be found in the registry.


registry path

A string value that is the full path to the registry value that holds the

path to the executable. If the registry value is the default parameter, the

path should end
with the key name and a backward slash (
see example

below). In the Detection Function,
the script must check the return value

of Detect to determine whether to continue
processing or terminate the

script.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





20

Example:


if(Detect“MyApp.exe”,”HKLM
\
\
Software
\
\
Microsoft
\
\
Windows
\
\
CurrentVersion
\
\
App
Pa
ths
\
\
MyApp.exe
\
\
”)==false)

{

return;

}


DirectoryExists


Description
This command verifies that a directory (folder) exists.


Syntax
DirectoryExists(<directory path>,
[machine constant]
);


Parameters

directory
path
A

string value that is the file path to
the directory.


machine constant

This optional parameter indicates whether to look on the source or the

destination machine for the directory (
Constants and

Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source

machine for the specifie
d file. If the
parameter is
DESTINATION
the

interpreter looks on the destination machine.


Examples:

i
f

(DirectoryExists(“c:
\
\
My Documents”))

StoreDirectory(“c:
\
\
My Documents”);

if (DirectoryExists(“c:
\
\
My Documents”,
SOURCE
))

ApplyDirectory(“c:
\
\
My Docume
nts”);



EnumDirectories


Description
This command

returns a list of all directories under the specified path
.


Syntax
EnumDirectories
(<directory path>, [machine constant]);


Paramete
rs

directory path
A string value that is the path to the directory.


mach
ine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
param
eter is
DESTINATION
the interpreter looks on the destination machine.



Example:

var dirList = EnumDirectories("C:
\
\
Program Files", SOURCE);

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





21

for (dirIdx in dirList)

{


var dir = dirList[dirIdx];


//do something

}


EnumFiles


Description
This command

retur
ns a list of all files under the specified path
.


Syntax
EnumFiles(<
file
path>, [machine constant]);


Parameters

file
path
A string value that is the path to the directory.


machine constant

This optional parameter indicates whether to look on the source o
r the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.


Example
:

var fileList = EnumFiles("C:
\
\
Program Files", DESTINATION);

for (fileIdx in fileList)

{


var file = fileList[fileIdx];


//do something

}


EnumKey


Description
This command

returns a list of all keys under the specified path
.


Syntax
EnumKey(<
key

path>,
[machine constant]);


Parameters

key

path
A string value that is the path to the
key
.


machine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter
is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.


Example:

var keyList = EnumKey("HKCU
\
\
Software");

for (keyIdx in keyList)

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





22

{


var key = keyList
[keyIdx];


//do something

}



EnumValue


Description
This command

returns a list of all values under the specified path
.


Syntax
EnumValue(<key path>, [machine constant]);


Paramete
rs

key
path
A string value that is the path to the
key
.


machine constant

T
his optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTIN
ATION
the interpreter looks on the destination machine.


Example:

var valueList = EnumValue("HKCU
\
\
Software
\
\
ComputerAssociates", SOURCE);

for (valueIdx in valueList)

{


var value = valueList[valueIdx];


//do something

}


Exit


Description
This command ex
its a script. If a
string
value
is passed in

it is

writt
en to the debug
and error logs.


Syntax
Exit ( [string] )


Parameters

string
an optional string value to be posted in the debug and error logs


Examples:

Exit (“Exiting because MS Word does not exis
t on

machine.”);





Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





23

Execute


Description
This command executes an executable or dll. If the execute is unable to

find the file or dll and make the call, the function returns false.


Syntax
Execute(<path to exec
utable or function>, <parameter
>,
[
boolean
]
);


Paramete
rs

path to executable of function

The path to the function to be executed. If the path is to a
dll, then the

API function needs to be right after two semicolons. The format of the

dll
call is
dll PATH::APIFunctionName.
If
Execute

is called on a
dll

function, the dll must
be Extern “C” declared as shown below:

parameter
Parameter

to pass to the function
.

boolean
Wait for execute to return


int FunctionName();

int FunctionName(const char *);


Examples:

//executes
Notepad
with the following file, my
file.txt and

//waits for the process to end

Execute(“c:
\
\
Windows
\
\
notepad.exe”, “myfile.txt”,true);


//executes
Notepad
without parameters, no waiting

Execute(“c:
\
\
Windows
\
\
notepad.exe”);


//makes a call into the dll with parameters

Execute(“c:
\
\
Windows
\
\
S
omelib.dll::CheckNetwork”,“000d1”);


FileExists


Description
This command verifies that a file exists either on the source or destination

machine.


Syntax
FileExists(<file path>,
[machine constant]
);


Parameters

file path

A string value that is the path to

the file.


machine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified fi
le. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.




Examples:

if
(FileExists(“c:
\
\
My Documents
\
\
myfile.txt”))

StoreFile(“c:
\
\
My Documents
\
\
myfile.txt”);

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





24

if (FileExists(“c:
\
\
My Documents
\
\
myfile.txt”, true))

ApplyFile(“c:
\
\
My Documents
\
\
myfile.txt”);

GetPlatform


Description
This command returns the machine’s platform. Return platform values

are listed in
on

page

12
.


Syntax
GetPlatform(
[machine constant]
);


Parameters

machine constant

This optional parameter indicates w
hether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the

destination machine.


Examples:

if (GetPlatform(true))==WIN95

ApplyWin95Word();



IsLikeNT


Description
This command returns true if the machine specified is NT like (i.e. WinNT,
Win2k, WinXP, Vista).


Syntax
IsLikeNT
( [machine constant]);


Parameters

m
achine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
pa
rameter is
DESTINATION
the interpreter looks on the destination machine.


Examples:

if (
IsLikeNT
(
SOURCE)
==

false)

{

ApplyWin9
xSettings
();

}



Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





25

KeyExists


Description
This command verifies that a registry key exists either on the source or

destination mach
ine.


Syntax
FileExists(<key path>,
[machine constant]
);


Parameters

key path

A string value that is the path to the key.


machine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Consta
nts and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.


Example:

if KeyExists(“HKLM
\
\
Software
\
\
Microsoft
\
\
Plus!”,
true))

ApplyKey(“HKLM
\
\
Software
\
\
Microsoft
\
\
Plus!”);



Message


Description
This command displays a message to the user. The parentheses are

optional.


Syntax
Message( <string> );


Paramete
rs

string

A string value that is the message to display.


Examples
:

Message (“help!”);


Print


Description
This command prints a message to the debug or validate log.


Syntax
Print (<string expression>, [print level
] )
;





Parameters

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





26

string expression

A string value that is the expression to print to the logs. The pare
ntheses

are optional.


print level

An optional keyword indicating the importance level of the printed

statement.
Valid keywords are GENERAL, MODERATE, DETALED,

and VERY_DETAILED
(
page
11
-
12
). If
print level
is not

specified, the parameter defaults to GENER
AL.


Examples:

Print (“Warning, file win.ini will be

overwritten”);



PrintException


Description
This command prints a string message to the exception log, which is

used for
viewing items
Unicenter Desktop DNA

is unable to move or post migrations

instruc
tion. The
PrintException command can only be used in

Apply Functions.


Syntax
PrintException ( <string expression>, [print level]
)
;


Parameters

string expression

A string value that is the expression to print to the exception log. The

parentheses are optio
nal. If
print level
is not specified, the parameter

defaults to
GENERAL.


print level

An optional keyword indicating the importance level of the printed

statement.
Valid keywords are GENERAL, MODERATE, DETALED,

and VERY_DETAILED
(
page
11
-
12
).


Examples:

P
rintException
(“This is an exception message.
”);



RestartRequired



Description
Desktop DNA
will save this flag and only display the restart required dialog if the
flag is true and
Desktop DNA
's other operations (ie. file migration) do not require a restar
t.

Scripts
default to NOT prompt for restart, so if a script needs a restart to complete a migration
successfully then it should call this command. All scripts written in the old scripting language will
trigger a restart because they have no way to specify

one way or the other.


Syntax

RestartRequired([
boolean
]);



Parameters

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





27

boolean

Specify true for restart is required and false for no restart required. (default is
true).


Example:

function MyApplyFunction
ThatNeedsARestart
()

{

RestartRequired();


// do
so
mething

}



RetrieveValue


Description
This command retrieves a registry key value either from the source or

destination
machine.


Syntax
RetrieveValue (<key path>, <value name>,
[machine constant]
)
;


Parameters

key path

A string value that is the path to
the key as listed in the registry.



value name

A string value that is the value of the key as listed in the registry.


machine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants

and Keywords
). If the parameter is
SOURCE
, the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.


Example:

var toolTips =
RetrieveValue(“HKCU
\
\
Software
\
\
Micro
soft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”);


return


Description
This command returns a
value
or nothing from a function.


S
yntax/Example

function
MyFunction()

{

/* do something*/

r
eturn

false
;

/* this statement is never executed*/

}


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





28

ValueExists


De
scription
This command verifies that a registry key value exists in the registry or

ini file
either from the source or destination machine.


Syntax
ValueExists(<key path>, <value name>,
[machine constant]
);


Parameters

key
path
A

string value that is the
path to the key.


value name

A string value that is the name of the value.


machine constant

This optional parameter indicates whether to look on the source or the
destination machine for the directory (
Constants and Keywords
). If the parameter is
SOURCE
,
the interpreter looks on the source machine for the specified file. If the
parameter is
DESTINATION
the interpreter looks on the destination machine.


Examples:

if (ValueExists(“HKCU
\
\
Control Panel
\
\
Desktop”,Smooth Scrolling”, true))

{

ApplyValue(“HKCU
\
\
C
ontrolPanel
\
\
Desktop”,”Smooth Scrolling”);

}



Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





29

Detection Commands


Every script must have a Detection Function to verify that the application

for the script exists on the source
or current machine. The

Detection Function can also contain statements to dis
play options for

the user to
select, and then
Unicenter Desktop DNA

uses these selections to

associate them with their corresponding
Store, Apply and Validate

Functions. Only general commands and the Option command may

occur in this
function.



Detect


Des
cription
This General command is repeated here although it is not limited to the

Detection
function. On the source machine this command is called from

the Detection function and specifies
the application associated with the

script, of which there can be on
ly one. On the destination
machine, it

can be called from anywhere in order to resolve the application path.

The interpreter
resolves the APPLICATIONPATH keyword, which is

not valid and should not be used before
Detect is called. For efficiency,

the script

should call Detect in the Detection function.


Syntax
Detect(<executable name>, [registry path]);


Parameters

executable name

A string value that is the executable name of the application. This value

can be found in the registry.


registry path

A string

value that is the full path to the registry value that holds the path

to the executable. If the registry value is the default
value
, the path

should end with the
key name and a backward slash (see example

below). In the Detection function, the script
must
check the return value

of Detect to determine whether to continue processing or
terminate the

script.


Example:

i
f

(

Detect
(
“MyApp.e
xe

,

HKLM
\
\
Software
\
\
Microsoft
\
\
Windows
\
\
CurrentVersion
\
\
AppPaths
\
\
MyApp.exe
\
\
”)

==

false)

{

return;

}







Option


Descr
iption
This command creates an option for display on the settings pages of

Unicenter
Desktop DNA
. It also associates the Store, Apply and Validate functions

for the option. If the user
Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





30

chooses an option, then the functions

associated with the option are in
voked by the interpreter and
the

option’s parent functions are also invoked. The Option command plays

a major role in
conditional detection statements (see the
Script Writing

Training Guide
,
Conditional Detection,
page 4
-
3
).


Syntax


Option(<option path>,
[Store function name], [Apply function name],

[Validate function name]
,
[language independent path]
);


Paramete
rs

option path

A string value that is the path to the option. This is also the statement

that is
displayed to the user. If backslashes are used,

a hierarchy is indicated

and nodes
following the backslashes appear indented on the next

line in the tree view of options.


functions
Names of functions in the script to call when for each state of a migration when
the user selects this option.


Language
independent path
An English only path that matches the exact structure of the
first “option path” parameter. This path is used in templates to refer to the selection of
this option. This is important when scripts are localized and the “option path” is
tran
slated to another language.




Examples:

Option(“Microsoft Word
\
\
Toolbar
\
\
Tooltips”,”StoreTooltips”, ApplyTooltips”,

“ValidateTooltips”
, “msword
\
\
toolbar
\
\
tooltips”
);

6

6

Store


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





31

Store Commands



Store commands specify which keys, key values and files to
retrieve

from the source machine. Only Store
and General commands can occur

in Store functions.


StoreDirectory


Description
This command retrieves a directory’s (folder’s) contents from the source

machine.


Syntax
StoreDirectory(<directory path>);


Parame
ter

directory path

A string value that is the path to the directory.


Example:

StoreDirectory(“c:
\
\
My Documents”);



StoreFile


Description
This command retrieves a file from the source machine.


Syntax
StoreFile(<file path>);


Parameter

file path

A strin
g value that is the path to the file.


Examples:

StoreFile(“c:
\
\
temp
\
\
file.txt”);

StoreFile(“c:
\
\
temp
\
\
*.txt”);


StoreKey


Description
This command retrieves a registry key and all its values or an ini file

section and
all its values from the source machi
ne.


Syntax
StoreKey(<key path>);


Parameter

key path

A string value that is the path to the key or ini file.



Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





32

Example:

StoreKey(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Options”);


StoreMappedFile


Description
This command retrieves a file from t
he source machine.

If any of the
file data

is a
directory path, this command ensures that they are mapped to the appropriate path.



Syntax
Store
Mapped
File(<file path>
, [delimiter]);


Parameter

file path
A string value that is the path to the file.


Examp
les:

StoreFile(“c:
\
\
temp
\
\
file.txt”);

StoreFile(“c:
\
\
temp
\
\
*.txt”);


StoreMappedKey


Description
This command retrieves a registry key and all its values or an ini file

section and
all its values from the source machine. If any of the value

names or value

data is a directory path,
this command ensures that they

are mapped to the appropriate path.


Syntax
StoreMappedKey(<key path>);


Parameter

key path

A string value that is the path to the key or ini file.


delimiter
An optional string parameter that is t
o be used as the delimiter.


Example:

StoreMappedKey(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Options”);



StoreMappedValue


Description
This command retrieves a registry key value or an ini file section value

from the
source machine. If the value n
ame or value data is a directory

path, this command ensures that
they are mapped to the appropriate

path.

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





33


Syntax
StoreMappedValue(<key path>,<value name>, [delimiter]);


Parameters

key path

A string value that is the path to the key value or ini file sec
tion value.


value name

A string value that is the value name and should be NULL (““) if the

value is
the default value. This is a required parameter.


delimiter

An optional string parameter that is to be used as the delimiter.


Examples:

StoreMappedValue
(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office

\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”);

StoreMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Windows
\
\
CurrentVersion
\
\
App
Paths
\
\

Navw32.exe”, “Path”, “;”);



StoreMappedSubKeys


Description
This command retrieves a registry key,
all its values and all its
sub keys

from the
source machine. If any of the value names or value data are

directory paths, this command ensures
that they are mapped to the

appropriate paths.


Syntax
StoreMappedSubKeys(<key path>);


Paramete
rs

key path

A str
ing value that is the path to the key.


Example:

StoreMappedSubKeys(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Options”);



StoreSubKeys


Description
This command retrieves a registry key, all its values and all its
sub keys

from the
source machine.


Syntax
StoreSubKeys(<key path>);


Parameters

key path

A string value that is the path to the key.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





34


Example:

StoreSubKeys(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word”);


StoreValue


Description
This command retrieves a registry key value or an ini file
section value

from the
source machine.


Syntax
StoreValue(<key path>,<value name>);


Paramete
rs


key path

A string value that is the path to the key value or ini file section value.


value name

A string value that is the value name.


Example:

StoreValue(“
HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”);








Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





35

Apply Commands





Apply commands specify which keys, key values and files to apply to

the destination machine. Only Apply
and General commands can occur

in Apply functions. For

the most part, the Apply functions should mirror

the Store functions.



ApplyFile


Description
This command applies a file from the source machine to the destination

machine.
Only data that was stored from the source machine can be

applied. This command r
ecognizes the
asterisk (*) as a wildcard. When

applying, if the storing path contains a wild card string, the wild
card is

not
included in the moving path.


Syntax


ApplyFile(<file name>, [overwrite method]);


ApplyFile(<file name>, <new file name>, [over
write method]);


Parameter

file name

A string value that is the name of the file to apply.


new file name

A string value that is a new name for the file that is being applied. The

NULL (““) placeholder is not required if this parameter is omitted. If the

second
parameter includes a new file path, the file <file name> is

applied to <new file name>.


overwrite method

This optional parameter specifies one of three constants indicating the

choice of overwrite method. The constants are ALWAYS, NEWER and

NEVER
(
Constants and Keywords
).


Examples:

ApplyFile(“c:
\
\
temp
\
\
file.txt”);

// Wildcard example

ApplyFile(“c:
\
\
My Documents
\
\
*.txt”, “c
:
\
\
New Path
\
\
WordDocuments”, ALWAYS);


ApplyDirectory


Description
This command applies a directory’s (folder’s) contents to the

destination machine.
Only data that was stored from the source machine can be applied.


Syntax
ApplyDirectory(<directory path>);


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





36

Parameter

directory path
A string value that is the path to the directory.


Example:

StoreDirectory(“c:
\
\
My Documents”);



A
pplyKey


Description
This command applies a registry key and all its values or an ini file

section and all
its values from the source machine to the destination

machine. Only data that was stored from the
source machine can be

applied.


Syntax
ApplyKey(<ke
y path>, [new key path]);


Parameter

key path

A string value that is the path to the key or ini file.


new key path

A string value that is the new path to the key or ini file to be applied.


Example:

ApplyKey(“HKLM
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Data
\
\
Toolbar”);



Apply
Mapped
File


Description
This command applies a file from the source machine to the destination machine.
Only data that was stored from the source machine can be applied. This command recognizes the
asterisk (*) as a wildcard. When

applying, if the storing path contains a wild card string, the wild
card is
not
included in the moving path.


Syntax


Apply
Mapped
File(<file name>, [overwrite method]);


Apply
Mapped
File(<file name>, <new file name>, [overwrite method]
, [shortpaths], [deli
miter]
);


Parameter

file name
A string value that is the name of the file to apply.


new file name
A string value that is a new name for the file that is being applied. The
NULL (““) placeholder is not required if this parameter is omitted. If the second
parameter includes a new file path, the file <file name> is applied to <new file name>.


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





37

overwrite method
This optional parameter specifies one of three constants indicating the
choice of overwrite method. The constants are ALWAYS, NEWER and NEVER
(
Constan
ts and Keywords
).


shortpaths
An optional boolean parameter that is set to true if you want the new key path
to be converted to the short path format. This is usually done only if the path was in short
path format in the source machine registry.


delimiter

An optional string parameter that is to be used as the delimiter.



Examples:

Apply
Mapped
File(“c:
\
\
temp
\
\
file.txt”);

ApplyMappedFile(“c:
\
\
temp
\
\
file.txt”, “c:
\
\
temp
\
\
newfile.txt”, ALWAYS, false,
“|;,”);



ApplyMappedValue


Description
This command applies

a registry key value or an ini file section value

from the
source machine to the destination machine. If the value name

or value data is a directory path, this
command ensures that they are

mapped to the appropriate path. Only keys that were stored from
t
he

source machine can be applied.


Syntax


ApplyMappedValue(<key path>,<value name>, [new key path],

[delimiter], [shortpaths], [new value
name]);


Paramete
rs

key path

A string value that is the path to the key value or ini file section value.


value name

A string value that is the value name and should be NULL (““) if the

value is
the default value. This is a required parameter.


new key path

A string value that is the new path to the key or ini file to be applied. If

you
are not moving the value to a new

location, the third parameter

should be NULL (““).


d
elimiter

An optional string parameter that is to be used as the delimiter.


shortpaths

An optional boolean parameter that is set to true if you want the new key

path
to be converted to the short path fo
rmat. This is usually done only

if the path was in short
path format in the source machine registry.


new value name

A string value that is the new value name if moving to a new location.


Examples:

A
pplyMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”);


ApplyMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”,“HKLM
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”;


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





38

ApplyMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,

“Tooltips”,“HKLM
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”, “;”);


ApplyMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”, “”, “ ”, “;”);


ApplyMappedValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”
,
“Tooltips”, “”, “ ”,“;”,true);




ApplyMappedKey


Description
This command applies a registry key and all its values or an ini file section and all
its values from the source machine to the destination machine. If any of the value names or value
data is
a directory path, this command ensures that they are mapped to the appropriate path. Only

keys that were stored from the source machine can be applied.


Syntax
ApplyMappedKey(<key path>);


Parameter

key path
A string value that is the path to the key or
ini file.


new key path
A string value that is the new path to the key or ini file to be applied.


Example:
ApplyMappedKey(“HKLM
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Data
\
\
Toolbar”);



ApplyMappedSubKeys


Description
This command applies a registry key
, all its values and all its
sub keys
;

or an ini
file section and all its values from the source machine to the

destination machine. If any of the
value names or value data are

directory paths, this command ensures that they are mapped to the

appropriate p
aths.


Syntax
ApplyMappedSubKeys(<key path>, [new key path]);


Paramete
rs

key path

A string value that is the path to the key.


new key path

A string value that is the new path to the key or ini file to be applied.


Example:
ApplyMappedSubKeys(“HKCU
\
\
Softw
are
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word
\
\
Data
\
\
Toolb
ar”);

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





39


ApplySubKeys


Description
This command applies a registry key, all its values and all its
sub keys

from the
source machine to the destination
machine. Only

keys that were

stored from the source machine
c
an be applied.


Syntax
ApplySubKeys(<key path>, [new key path]);


Paramete
rs

key path

A string value that is the path to the key.


new key path

A string value that is the new path to the key or ini file to be applied.


Example:


ApplySubKeys(“HKCU
\
\
Softwa
re
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Word”);


ApplyValue


Description
This command applies a registry key value or an ini file section value

from the
source machine to the destination machine. Only values that

were stored from the source machine
can be applied.


Sy
ntax
ApplyValue(<key path>,<value name>, [new key path], [new value name]);


Parameters

key path

A string value that is the path to the key value or ini file section value.


value name

A string value that is the value name.


new key path

An optional string

value that is the new key path.



new value name

An optional string value that is the new value name.


Example:

ApplyValue(“HKCU
\
\
Software
\
\
Microsoft
\
\
Office
\
\
8.0
\
\
Common
\
\
Toolbar”,
“Tooltips”);


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





40

DeleteKey


Description
This command deletes a key and all
its values from the registry or an ini

file
section on the destination machine. If there were problems deleting

the key specified, the
command returns false. If the key does not exist,

the command returns true. If the path is to an ini
file, then all secti
ons in

the ini file are deleted.


Syntax
DeleteKey(<key path>);


Parameters

key path

A string value that is the path to the key or ini file section to be deleted.


Examples:

DeleteKey(“HKCU
\
\
Software
\
\
MyApp”);


DeleteKey(“c:
\
\
Windows
\
\
test.ini
\
\
KeyName”)
;


//all keys are deleted in the following example

DeleteKey(“c:
\
\
Windows
\
\
test.ini”);


DeleteValue


Description
This command deletes a value from the registry or an ini file section on

the
destination machine. If there were problems deleting the value

spe
cified, the command returns
false. If the value does not exist, the

command returns true.


Syntax
DeleteValue(<key path>,<value name>);


Paramete
rs

key path

A string value that is the path to the key value or ini file section value.


value name

A string v
alue that is the value name to be deleted.


Examples:

DeleteValue(“HKCU
\
\
Software
\
\
MyApp”, “SomeValue”);


DeleteValue(“c:
\
\
Windows
\
\
win.ini
\
\
MyApp”,“SomeValue”);



Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





41


GetMappedPath


Description
This command returns the new file path mapped to the new machin
e.

The
command also has the ability to take paths which have different

delimiters than the common “
\

character.


Syntax
GetMappedPath(<old path>,[<path delimiter>]);


Parameters

old path

A string value that is the old path.


path delimiter

An optional st
ring value that is the delimiter to be used for the new path.


Examples:

// newpath will equal the new file path

newPath=GetMappedPath(“c:
\
\
oldpath
\
\
file.txt”);


// newpath will equal the new file path with the

// delimiter; for example, newPath could equ
al

// e:_new path_file.txt

oldPath=(“c:_oldpath_file.txt”);

newPath=GetMappedPath(oldpath,”_”);




MapPath


Description
This command maps one path to another for the duration of a script. The

path
mapping applies to all Apply operations following the MapPa
th

command in the current script.
This command had the effect of

replacing all paths that match <old path> with <new path> in the

commands ApplyDirectory, ApplyFile, and ApplyMappedValue.


Syntax
MapPath(<old path>,<new path>);


Parameters

old path

A strin
g value that is the old path.


new path

A string value that is the new path.


Examples:

MapPath=(“c:
\
\
windord
\
\
data”, “c:
\
\
winword
\
\
New Data”);


Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





42


SetKey


Description
This command creates or sets a key in the registry or an ini file.


Syntax
SetKey(<key pa
th>);


Parameters

key path

A string value that is the path to the key.


Examples:
SetKey=(“HKLM
\
\
New Key”);


SetValue


Description
This command creates or sets a registry or an ini file key value. If the

key does not
exist, the key is created. All four pa
rameters are required.


Syntax
SetValue(<key path>, <value name>, <value data>, <value type>);


Parameters

key path

A string value that is the path to the key.


value name

A string value that is the value name.


value data

A string value that is the value

data.


value type

A constant value. The following list of registry value types are

permitted:


Value Format Example

STRING string “Bobbie”

DWORD number “2001”

BINARY binary “AF 45 99 31”

DWORD_LITTLE_ENDIAN number “
4321


DWORD_BIG_ENDIAN number “1234”

SYM
BOLIC_LINK binary “AF 45 99 31”

MULTI_STRING binary “AF 45 99 31”

RESOURCE_LIST binary “AF 45 99 31”

EXPAND_STRING string “Bobbie”

FULL_RESOURCE_DESCRIPTOR binary “AF 45 99 31”

RESOURCE_REQUIREMENTS_LIST binary “AF 45 99 31”







Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





43

Examples:

SetValue(“HKLM
\
\
Destination”,”String Value”, “This

is a string value”,
S
TRING);


SetValue(“HKLM
\
\
Destination”,”Dword Value”,“0x00000409”, DWORD);


SetValue(“HKLM
\
\
Destination”,”Binary Value”, “0F02”, BINARY);


SetValue(“HKLM
\
\
Destination”,”Multi String Value”,“0F 02 09
AF”, STRING);

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





44

C
onverting old scripts

to DNA JavaScript
:


The current DNAScript component remains the same to handle processing of the old scripting
language. No modification to the old language was made. A new component, DNAScriptJS, was
created to handl
e processing of the new scripting language. The new DNA JavaScript files are
given a new extension and the compiled DNA JavaScripts are also given a new extension. This
will allow Desktop DNA to support the loading and compiling of new and old scripts with
out the
time consuming process to determine what language the script is written in. This supports all
current processes.


All old script needs to be converted to the new JavaScript format in order to edit with the new
version of DNA Studio. The conversion
can be down automatically by DNA Studio when the script
file is being opened up for the first time.





All non locally declared variables will be moved to JavaScript's global scope or document
scope (outside any functions)




All StoreFunction, ApplyFunction,

ValidateFunction, and Function declarations will be
changed to "function"




All Print, PrintException, Exit, commands will be converted to the function call format (ie.
Print() )




and, And, AND will be converted to &&




or, Or, OR will be converted to ||




Break, BREAK will be converted to "break"




Else will be changed to "else"




If will be changed to "if"




While and WHILE will be changed to "while"




exit will be changed to Exit()




False and FALSE will be changed to "false"




True and TRUE will be changed to
"true"




local, Local, and LOCAL will be changed to "var"




message will be changed to "Message"




option will be changed to "Option"




print will be changed to "Print"

Unicenter Desktop DNA Command Language Reference Guide


© 2004 Computer Associates International, Inc. This document is the exc
lusive property of Computer Associates International, Inc.


No part of this document may be disclosed, copied, or used without express written approval of Computer Associates Internatio
nal, Inc.


Re
vised by George Kubinyi


August, 2006


Unicenter Desktop DNA


Santa Barbara, CA





45




all single back slashes "
\
" found inside quotes will be escaped with a back slash "
\
\
"




an
y variables in the old scripts that match the new constants (APPDATAPATH,
NEW_APPDATAPATH, PERSONALPATH, etc.) will have to be changed so they do not
conflict with the new constants.




Enumerations will be changed as follows:

The BeginEnum command is no lon
ger supported.

The Enum* commands now return an Array object filled with all the enum
erated data.


Old code:


BeginEnum
(key1, "HKCU
\
Control Panel
\
Appearance
\
New Schemes");

while
(
EnumKey
(key1))

{

BeginEnum
(key2, "HKCU
\
Control Panel
\
Appearance
\
New Schemes
\
"

+ key1 + "
\
Sizes");

while
(
EnumKey
(key2))

{


BeginEnum
(value, "HKCU
\
Control Panel
\
Appearance
\
New Schemes
\
" + key1 + "
\
Sizes
\
" +
key2);


while
(
EnumValue
(value))


{



StoreMappedValue
("HKCU
\
Control Panel
\
Appearance
\
New Schemes
\
" + key1 +
"
\
Sizes
\
" + key2, va
lue);


}

}

}


New code:


var

key1List =
EnumKey
("HKCU
\
\
Control Panel
\
\
Appearance
\
\
New Schemes");

for

(
var

key1
in

key1List)

{

var

key2List =
EnumKey
("HKCU
\
\
Control Panel
\
\
Appearance
\
\
New Schemes
\
\
" + key1List[key1] +
"
\
\
Sizes");

for

(
var

key2
in

key2List)

{


var

valueList =
EnumValue
("HKCU
\
\
Control Panel
\
\
Appearance
\
\
New Schemes
\
\
" +
key1List[key1] + "
\
\
Sizes
\
\
" + key2List[key2]);


for

(
var

value
in

valueList)


{



StoreMappedValue
("HKCU
\
\
Control Panel
\
\
Appearance
\
\
New Schemes
\
\
" +
key1List[key1] + "
\
\
Sizes
\
\
" + key2List[key2], valueList[value]);


}

}

}