Zfixapp – Batch
manipulation of App objects
Why ZfixApp?
Why did
we write this tool? While ZFD has some excellent functions for searching and
replacing within Application Objects, no such features exist for manipulating
many objects.
What can ZfixApp do?
ZfixApp
lets you manipulate a group of Application Objects from the command line. You
can set or delete application requirements, registry values and macros. You can
also report on certain proerties, ie “Show me all app that has a requirement
that C:\ is so and so” or “Give me a list of all SOURCE_PATHs”
Does ZfixApp support every App Object property?
No. The
ZFD application object formats are not publicly documented. Thus we had to
reverse-engineer every format we support. Therefore did we start with the aspects
that made most sense for the intended use of ZfixApp. Ie the chance of someone
wanting to flag all App Objects as ”Do not run on Xp” or change SOURCE_PATH is
much higher than someone wanting to add the same file to all Application
Objects.
What future support is planned?
We will
add support for more Application Object features in the future. The priority is
determined by what our customers need. Please send suggestions to support@pedago.fi and put ZfixApp enhancement
in the subject line.
What rights do I need to run ZFixApp?
The same
rights as you would normally need to change Application Objects through
ConsoleOne..
General ZfixApp Syntax
Run
ZfixApp as:
Zfixapp <container>
<name> <command> <category> <parameters>
<options>
Where:
Container – A fully
qualified container name, ie OU=RD.O=ACME, or .rd.acme
Name – A name, you can
use wildcards, ie MyApp or MyApp*
Command –
One of SET, DEL, CHG or RPT. SET sets re desired value (or replaces it if it
exists). DEL deletes the value, CHG does a search and replace on registry keys
and RPT simply reports on the desired value. Ie it will report all app objects
that as an OS requirement, a MACRO etc andthe respective values.
Category is one of: OS,
MEM, DISK, MACRO, TS, REGKEY, REGVAL
Parameters
are dependant on the category.
Options:
See the end of this document.
SET OS Requirement
Use this
to set an OS requirement for the application object
Syntax
Zfixapp <container>
<name> SET OS <OS> <compare> <major> <minor>
<build>
Where:
OS is one of: W3X,
W9X,W2K
Compare
(optional) is one of: LT, LE,EQ,GE, GT
Examples
ZfixApp
.rd.acme * SET OS W2K LT 5 1 0
This will
set all apps not to run on Xp
ZfixApp
.rd.acme * RPT OS W2K GE
This will
list all apps that have a OS requirement of greater or equal to Windows 2000
Set a memory requirement
Use this
to set a memory requirement for the application object
Syntax
Zfixapp <container>
<name> SET MEM <compare> <memory>
Where:
Compare (optional) is one
of: LT, LE,EQ,GE, GT
Memory is in Mb
Examples
ZfixApp .rd.acme * SET MEM
GT 100
This
will set all apps to require more ram
than 100Mb
Set a DISK space requirement
Use this
to set a disk/directory requirement for
the application object
Syntax
Zfixapp <container>
<name> SET DISK <disk> <compare> <memory>
Where:
Disk is a drive
letter, a directory or one of the special ZEN macros, ie %*WINSYSDIR%. Macros
need to be all uppercase if used.
Compare (optional) is one
of: LT, LE,EQ,GE, GT
Memory is in Mb
Examples
ZfixApp .rd.acme * SET DISK
%*WINSYSDIR% GT 100
This
will set all apps to require more than
100Mb free space in the Windows system directory
Set a CPU requirement
Use this
to set a cpu for the application object
Syntax
Zfixapp <container>
<name> SET CPU <compare> <cpu>
Where:
Compare (optional) is one
of: LT, LE,EQ,GE, GT
Cpu is one of: 386,
486, PENT,PPRO,PII,PIII,PIV
Examples
ZfixApp .rd.acme * SET CPU
GT PIII
This will
set all apps to require a better than Pentium III CPU
SET a Terminal Server Requirement
Use this
to set a Terminal Server requirement for the application object
Syntax
Zfixapp <container>
<name> SET TS <required> <show>
Where:
Examples
ZfixApp .rd.acme * SET TS 1
1
This will
set all apps to require Terminal Server and se the show flag to true
ZfixApp
.rd.acme * DEL TS 1 1
This will
delete all Terminal Server requirements
Set a MACRO
Use this
to set a macro for the application object to a certain value. If the macro does
not exist, it is created.
Syntax
Zfixapp <container>
<name> SET MACRO <name> <value>
Where:
Name is the name of
the macro, for example SOURCE_PATH
Value is the string
value of the macro, for example F:\Program. Paths with spaces must be enclosed
in quotes.
Examples
ZfixApp .rd.acme * SET MACRO
SOURCE_PATH F:\Program
This will
set all apps to have a SOURCE_PATH of F:\Program
ZfixApp .rd.acme * RPT MACRO
SOURCE_PATH
This will
list all apps that have SOURCE_PATH defined, along with the value of that
macro.
Set a Registry Key
Use this
to create a registry key
Syntax
Zfixapp <container>
<name> SET REGKEY <name>
Where:
Name is
the name of the registrykey, for example HKEY_USERS\Newkey
Keys with
spaces must be enclosed in quotes.
Examples
ZfixApp .rd.acme * SET
REGKEY HKEY_USERS\Newkey
This
will set all apps to have a registry
key under HKEY_USERS by the name of Newkey
Set a Registry value
Use this
to set or create a registry value
Syntax
Zfixapp <container>
<name> SET REGKEY <name> <valuename> <value>
<type> <flags>
Where:
Name is the name of
the registrykey, for example HKEY_USERS\Newkey
Valuename
is the name of the value, for example “Printers”
Value is the actual
value, the type depends on the type, see examples
Type (optional) is the
type, which is one of:
1 =
Binary .- An octet string. Supply the value as a string of hex digits, ie
ABBACAFE
2 =
String – A string value for example “lpt1”
3 = DWORD
– A four-byte integer. Supply the value as 4711 or 0x456
6 =
Expand – Expand string, treated as a string.
4=
default - Default value, treated as
string. Supply a value name of “(Default)”.
9 =
multivalue – Treated as string for now.
If none
is given, string is assumed
Flags determine how the
entry is distributed:
0 =
Delete
1 =
Create always
2 =
Create if exists
4 =
create if not exists.
If no
flags are supplied, ZfizApp assumes “create if not exists”
Keys with
spaces must be enclosed in quotes.
Examples
ZfixApp .rd.acme * SET
REGVAL HKEY_USERS\Newkey
ZfixApp .rd.acme * SET REGVAL HKEY_USERS\Newkey Value5 010203ff 1 4 (Binary value)
ZfixApp .rd.acme * SET REGVAL HKEY_USERS\Newkey Value5
4711 3 1 (DWORD value of 4711)
ZfixApp .rd.acme * * SET REGVAL HKEY_USERS\Newkey Value6
4711 3 0 (Delete the value)
Change a macro
Use this
to change a string in a registry value or macro
Syntax
Zfixapp <container>
<name> CHG MACRO <name> <valuename> <oldvalue>
<newvalue>
Examples
ZfixApp
.rd.acme * CHG
MACRO SOURCE_PATH sys vol1 (Replace SYS with VOL1 in SOURCE_PATH)
Program options
Options
modify the way the program works and are always preceded by hyphens
-l = Log diagnostic output
to file zfixapp.log
-v = Verbose mode (ie -v0..v9)
-s = Subtree from given
container and down. BE CAREFUL!
-t = Act on specified tree,
ie –tTREENAME
-u = Username, ie
-u.admin.ema (only used if run on the server console)
-p = Password, ie -psecret
(only used if run on the server console)