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