|
-
May 6th, 2003, 06:33 PM
#1
Thread Starter
Frenzied Member
Command line script
Can anyone help me with this script...
REM Check if this has been run before
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v Status
IF ERRORLEVEL 1 GOTO update ELSE GOTO quit
REM Do this if this is first run
:update
REM update and save result to logfile
reg.exe import test.reg >> %COMPUTERNAME%.txt
IF ERRORLEVEL 1 GOTO faulty ELSE GOTO quit_ok
:faulty
echo ERROR! >> %COMPUTERNAME%.txt
goto quit
:quit_ok
echo Update complete! >> %COMPUTERNAME%.txt
:quit
echo bye >> %COMPUTERNAME%.txt
for now it is very basic, all it does is that it set a flag to prevent the test.reg file to be uploaded more than once and write some output to a logfile. But the problem is that EVERYTHING is performed, the IF's doesn't seem to be working. ANyone that has any clues????
kind regards
Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|