OSD or USMT capturing Local Administrators Group and restoring it?



Greetings,
All our computers have the Domain user as part of the local Adminstators
group on each of their PCs (example each machine will have their own user
name in the Administrators group, Domain\JohnB).

With the OSD or USMT tool, is there a way to capture the users in these
groups and restore them after the OSD upgrade? I noticed that after the
upgrade from Win2k to the OSD image containing WinXP, the user profiles are
restored but any users in the Adminstrators Group don't get backed up or
restored and I have to manually enter this in. Is there a way to do this
with the USMT tool, switches/inf?

Only thing I've come up with is to create a batch file (saved as .cmd) for
backup and restore , however I can't seem to figure out what the command line
when creating a Custom action to get it to run after the Validation phase. I
know it's failing on the batch file as the logs indicate a "The OS
installation failed action Capture Administrator Group with exit code 3. The
operating system reported error 2147500037: Unspecified error " where
Capture Administrator Group is my Custom Action that links it to the batch
file.

Not sure where to go right now, I'm sure it's something I type in the Custom
Action command line section.

My settings:
In the Advanced properties:
Validation:
1) left blank

State Capture, I've created:
1) Custom action: connect to a server where this batch file exists
2) Custom action: command line: backupAdmin.cmd
file:\\servername\batch\backupAdmin.cmd
3) Capture User State: \\servername\USMT, configuration files: migapp.inf,
migism.inf, migsys.inf, miguser.inf, sysfiles.inf, usmtdef.inf /v 5 /o /s /f
/all

Pre/Post Install:
1) left blank

State Restore
1) Restore User state: /v 5
2) Custom action: Connect to \\server\batch
3) Custom action: command line: restoreAdmin.cmd files:
\\server\batch\restoreAdmin.cmd

The batch files contain this:
Backup (backupAdmin.cmd):
net localgroup administrators > "c:\documents and settings\user.txt"
--> I believe the Documents and Settings get copied captured(still testing)
Restore (restoreAdmin.cmd):
for /F "tokens=1 skip=4" %%a in (user.txt) do NET LOCALGROUP Administrators
/ADD %%a

Any thoughts or suggestions?
.



Relevant Pages

  • OSD State Restore Phase Custom Action
    ... Restore Phase custom action. ... I have copied all the setup files to a shared folder. ... the installation files are. ...
    (microsoft.public.sms.tools)
  • Re: Backup and Restore Procedures
    ... I guess by concern is the restore right now. ... >and run the batch file again to create a new zip ... >The advantage of this is I always have a recent backup - if something ... >Probably overkill but the idea of starting over or having to burn a CD ...
    (microsoft.public.frontpage.client)
  • Re: Making backups by just copying files
    ... not restore my OS in case of a disaster ... There is little advantage in using a batch file. ... your command at the Command Prompt. ... The data I have covered under another program which syncs data to other computers on the network. ...
    (microsoft.public.windowsxp.general)
  • Re: Making backups by just copying files
    ... not restore my OS in case of a disaster ... one clever batch file will handle that. ... your command at the Command Prompt. ... The data I have covered under another program which syncs data to other computers on the network. ...
    (microsoft.public.windowsxp.general)
  • Re: Backup of Sysvol
    ... > state to an alternate location, then you should be able to browse the ... > SYSVOL folders and find the batch file. ... >> So if I want to restore a batch file from sysvol, ...
    (microsoft.public.windows.server.general)