dw5304
05-13-2007, 01:32 AM
im working on getting a batch file for a autoinstall after windows installes its self.
for updates and open office.
i have got everything done except the goto dose not work.
this is what i have so far.
@echo on
@set /P SDDRIVELETTER=Please enter the driveletter for your flash drive:
@cd %SDDRIVELETTER%:\
@pause
@if exist C:\office.txt goto error
@if not exist C:\office.txt goto office
@:error
@echo office is allready installed
@goto update
@:office
@set /P YESNO=do u want to install open office(y/n):
@If /I %YESNO% == 'y' then goto setup
@pause
@:update
@echo running updates>>C:\updates.txt
@if exist C:\1.txt goto 2
@echo running kb00001>>C:\1.txt
@goto 2
@:2
@if exist C:\2.txt goto 3
@echo running kb00002>>C:\2.txt
@echo Windows Registry Editor Version 5.00 >>C:\test.reg
@echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]>>C:\test.reg
@echo "batch"="%SDDRIVELETTER%:\\1.bat">>C:\test.reg
@regedit /s C:\test.reg
@shutdown.exe -r -t 10 -f
@:3
@echo all updates are done
@pause
@goto end
@:setup
@echo running openoffice install>>C:\office.txt
@pause
@goto update
@:end
all the other gotos seem to be working except for the one that tells it to goto setup.
@set /P YESNO=do u want to install open office(y/n):
@If /I %YESNO% == 'y' then goto setup
what am i missing?
for updates and open office.
i have got everything done except the goto dose not work.
this is what i have so far.
@echo on
@set /P SDDRIVELETTER=Please enter the driveletter for your flash drive:
@cd %SDDRIVELETTER%:\
@pause
@if exist C:\office.txt goto error
@if not exist C:\office.txt goto office
@:error
@echo office is allready installed
@goto update
@:office
@set /P YESNO=do u want to install open office(y/n):
@If /I %YESNO% == 'y' then goto setup
@pause
@:update
@echo running updates>>C:\updates.txt
@if exist C:\1.txt goto 2
@echo running kb00001>>C:\1.txt
@goto 2
@:2
@if exist C:\2.txt goto 3
@echo running kb00002>>C:\2.txt
@echo Windows Registry Editor Version 5.00 >>C:\test.reg
@echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]>>C:\test.reg
@echo "batch"="%SDDRIVELETTER%:\\1.bat">>C:\test.reg
@regedit /s C:\test.reg
@shutdown.exe -r -t 10 -f
@:3
@echo all updates are done
@pause
@goto end
@:setup
@echo running openoffice install>>C:\office.txt
@pause
@goto update
@:end
all the other gotos seem to be working except for the one that tells it to goto setup.
@set /P YESNO=do u want to install open office(y/n):
@If /I %YESNO% == 'y' then goto setup
what am i missing?