Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bat file to create an ERD on the server

Status
Not open for further replies.

jakesups

IS-IT--Management
May 6, 2003
18
0
0
US
I've created...finally...a bat file which copies the ERD files and registry data to a share on the network. Works wonderfully for a user with sufficient rights on the local PC, but my problem is that a limited user, aka Domain User, does not have read access to the %systemroot%\system32\repair directory to copy the registry hives or setup.log files.
Does anyone know how I can get these files with limited access or some other process that can get these files to the server share?

Here is the code for your use.
thanks, Jim



echo off
Rem This bat file will copy the ERD files from a computer and copy the
Rem Registry hives as well

If "%USERNAME%"=="JDoe" goto continue 'for test purposes
goto exit

:CONTINUE
set bkpfldr=\\images\erd
set AllowWildCards = TRUE
set AllowAllPaths = TRUE
set NoCopyPrompt = TRUE
if exist %bkpfldr%\%computername%\setup.log goto EXIT

Echo Creating ERD file details
if not exist %bkpfldr%\%computername% md %bkpfldr%\%computername%
copy %systemroot%\repair\setup.log %bkpfldr%\%computername%\setup.log
copy %systemroot%\system32\autoexec.nt %bkpfldr%\%computername%\autoexec.nt
copy %systemroot%\system32\config.nt %bkpfldr%\%computername%\config.nt
copy %systemroot%\repair\regback\*.* %bkpfldr%\%computername%

:EXIT

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top