ResEdit Hacks

By: Mike Kimball - Revised: 2006-06-29 devin


Use Apple's resource editor to modify RevRdist prefs and image files (keep in mind, exercise caution with any resource editor, as you can seriously hose your system if you're not careful).

ResEdit Downloads

ResEdit Small IconTo download ResEdit application with examples, click here.
Acrobat Reader Small IconTo download Apple's ResEdit documentation, click here. (link dead)
Web Path Small IconTo learn more about ResEdit, see ResExcellence web site.

Macintosh Name editing

When creating a master image for RevRdist synchronization, the Macintosh Name (Computer Name) is sometimes set in the System file ("Macintosh HD", typically). Then, when all machines have synchronized themselves to this file, they will display an error message on startup:
"The name 'Macintosh HD' is already in use on the AppleTalk network…"
Unless you have Okey Dokey (link dead) installed on your machines, this is an annoying problem.

Another problem that I have come across is with certain ASIP servers, such as our print queue machines, which have OS 8.6 and AppleShareIP 6.2 installed - they often will not accept a new Computer Name and/or Owner Name. As soon as you restart the machine, the old name comes back. I have tried numerous tricks (disabling File Sharing, deleting prefs, etc...) and found nothing "legit" works in some cases. So, ResEdit to the rescue...

Using ResEdit, open the System file, double click on the STR resource.

ResEdit System Window

Scroll down and select STR -16413.

STRs from System Window

Notice, the size of the 16413 resource is 32 bytes (31 possible characters in the name, plus one byte to indicate the size of the name). This is the correct size, regardless of what name you choose. Even if it is blank, the resource should be 32 bytes long (one byte to say its length is zero, plus 31 bytes of zeros). Whatever you do in editing this resource, MAKE SURE THE SIZE IS 32 BYTES. This will prevent "garbage" names from being broadcast (or showing up in the username field when connecting to servers via the chooser).

Ok...if you double-click on the resource, it will use ResEdit's normal Resource Editor. This is useful to verify your hex editing, or as a reference to compare your work to "non-hacked" System files. However, don't use it to edit the name, it doesn't do it correctly. Notice below it displays the name of the machine (Computer Name, or Macintosh Name), plus a bunch of zeros. The zeros indicate how many empty bytes are left over after storing the name you've chosen. If you see anything but zeros in this section, you need to correct your work. Here below, we see 28 empty bytes (each pair of digits is one byte). The other four (not shown) are used by the three letters of the name, plus one to store the size of the name.

16413 in Resource Editor

To do the actual editing of the name, go back to the "STRs from System" window and select the 16413 resource, then use the Resource menu to select "Open Using Hex Editor".

Resource menu w/ Open Using Hex Editor Selected

You should see something like this below. Notice, the first byte "03", which is the hex code for the value 3. The next three bytes, "41", "6A", and "61", correspond to the "A", "j", "a" in the name. Don't bother trying to figure out the hex for the letters, you can simply edit the text to the right of the window and it will convert it for you. However, make sure that you enter no more than 31 characters, that your first byte agrees with the length, and that when you are done you still have exactly 32 bytes (four lines, eight per line, just like the pic below).

16413 in hex Editor

For more info on hex values, see [Appendix: Hex Values].

Note that the first byte overrides anything else you put in, so you can hide part or all of the name depending on what size you specify. Thus, change the first byte to "00" to hide the name entirely. If you're creating a master System file for a RevRdist image, you should set this byte to zero so that the image file has no name (although you should also change all the remaining nonzero bytes to zeros).

16413 in hex Editor

Above we see the resource after changing the name to "Trinity Loren". The first byte is set to "0D", a value of 13. The thirteen characters (including the space) follow, and the remaining bytes are all zeros, so that the length (size) is 32 bytes.

Here's what the new name looks like in the plain Resource Editor:

16413 in Resource Editor

Again, we have nothing but zeros in the "Data" box, representing the empty spaces (18) left after the name (13) plus the byte that stores the size (1). 18 + 13 + 1 = 32.

After you set the Computer Name, repeat the steps above as desired to set the Owner Name, STR 16096:


RevRdist Menus

The RevRdist application comes with "Stop" and "Pause" buttons, which you may not want activated in the version that you run in your open access labs (you won't want anyone to interfere with the run of RevRdist). Using ResEdit, it is possible to open the RevRdist application, select the menus and disable their functions.

Also, you may want to disable the Menu Bar menus entirely. This can be done with ResEdit as well:

Open RevRdist Application with ResEditOpen the RevRdist application in ResEdit, and find the MENU resource (selected in picture to left). Double-click on this resource icon.

Open RevRdist Menu Resource with ResEditTo disable menus, double-click on the menu you wish to disable (as with the File menu, selected here) - it will bring up the info for that menu.

In the Menu window, deselect the "Enabled" checkbox as shown here:

Open RevRdist Menu Selection with ResEdit

RevRdist Prefs

Open RevRdist Prefs with ResEditOpen the RevRdist Prefs file in ResEdit, and find the STR resource (selected in picture to left). Double-click on this resource icon.

Open RevRdist Prefs STR Resource with ResEditTo configure the settings, double-click on the item you wish to set (as with the Password resource, selected here).

All of the resource windows look like this one (this is the "Directives file" resource; simply enter the path to your RevRdist distfile):

Open RevRdist Prefs Settings with ResEdit