Hello all. I was wondering if there is a way to install a reg. file during windows 7 install? For the logo option to work you need to install a reg file. So I need to know where I would put the reg file and if I need to make a .cmd or .bat file and where that would go. Please I would much like it if someone would help me out with this.
create a .bat script "SetupComplete.cmd" in <your root dvd/image path>\$OEM$\$$\SETUP\SCRIPTS\ this will allow you to inject any command, ie: registry - at user's 1st logon
I already have a file called that for the install of the loader at bootup. Is there a way to add it into the file? I have attached the file, if you all could help me out that would be wonderful
put ur reg file in the scripts folder ad line in SetupComplete.cmd REGEDIT /S %systemroot%\setup\scripts\your-reg.reg
I add to lunar21 scripts Code: @ECHO OFF :START :FINDPARTITION For /F "tokens=2" %%I IN ('ECHO LIST VOL ^| DISKPART ^| FINDSTR /R /C:"[0-9] [^Aa-Zz][^Aa-Zz] ...........* *NTFS *.......... *[12]00 M. "') DO CALL :PARSE %%I GOTO :INSTALL :PARSE SET FREEDRIVELETTER=0 FOR %%p IN (B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ( ECHO LIST VOL | DISKPART | FINDSTR /C:" %%p " >nul IF ERRORLEVEL 1 SET FREEDRIVELETTER=%%p ) IF %FREEDRIVELETTER%==0 GOTO :NOFREEDRIVES ECHO SELECT VOLUME %1 > "%TEMP%\MOUNT" ECHO ASSIGN LETTER=%FREEDRIVELETTER% >> "%TEMP%\MOUNT" ECHO SELECT VOLUME %1 > "%TEMP%\UNMOUNT" ECHO REMOVE >> "%TEMP%\UNMOUNT" GOTO :EOF :NOFREEDRIVES CALL :CLEANUP & EXIT :INSTALL IF EXIST "%TEMP%\MOUNT" DISKPART /S "%TEMP%\MOUNT" >nul FOR %%A IN (B: C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) DO ( IF EXIST %%A\bootmgr ( IF NOT EXIST "%%A\autorun.inf" ( COPY /b "%~dp0w7ldr1" + "%~dp0slic" + "%~dp0w7ldr2" %%A\w7ldr IF EXIST %%A\w7ldr ATTRIB %%A\w7ldr +h +s +r "%~dp0bootinst.exe" /nt60 %%A cscript //NOLOGO %SYSTEMROOT%\System32\slmgr.vbs -ipk *****-*****-*****-*****-***** cscript //NOLOGO %SYSTEMROOT%\System32\slmgr.vbs -ilc "%~dp0cert.xrm-ms" ) ) ) >nul IF EXIST "%TEMP%\UNMOUNT" DISKPART /S "%TEMP%\UNMOUNT" >nul CALL :CLEANUP & GOTO :FINISH :CLEANUP IF EXIST "%TEMP%\UNMOUNT" DEL /Q "%TEMP%\UNMOUNT" IF EXIST "%TEMP%\MOUNT" DEL /Q "%TEMP%\MOUNT" GOTO :EOF REGEDIT /S %systemroot%\setup\scripts\reg.reg :FINISH SHUTDOWN /R /T 30 EXIT After installation it's not running the reg file
The line you added: REGEDIT /S %systemroot%\setup\scripts\reg.reg is orphaned. It sits right after a GOTO :EOF, so it never gets executed.
goto :eof = goto end of file? Just wondering because Im going to modify this thing for an oem sources folder rar for different manufacturers using Orbit's toolkit for the oem files
actually in that script there is no label :EOF! Move your command after :FINISH and before the SHUTDOWN command
Just to make sure i placed it in 2 places and it worked. I do not know which one worked but it does!!!: 1. in the SetupComplete.cmd file: Code: @ECHO OFF :START REGEDIT /S %systemroot%\setup\scripts\acer.reg :FINDPARTITION For /F "tokens=2" %%I IN ('ECHO LIST VOL ^| DISKPART ^| FINDSTR /R /C:"[0-9] [^Aa-Zz][^Aa-Zz] ...........* *NTFS *.......... *[12]00 M. "') DO CALL :PARSE %%I GOTO :INSTALL :PARSE SET FREEDRIVELETTER=0 FOR %%p IN (B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ( ECHO LIST VOL | DISKPART | FINDSTR /C:" %%p " >nul IF ERRORLEVEL 1 SET FREEDRIVELETTER=%%p ) IF %FREEDRIVELETTER%==0 GOTO :NOFREEDRIVES ECHO SELECT VOLUME %1 > "%TEMP%\MOUNT" ECHO ASSIGN LETTER=%FREEDRIVELETTER% >> "%TEMP%\MOUNT" ECHO SELECT VOLUME %1 > "%TEMP%\UNMOUNT" ECHO REMOVE >> "%TEMP%\UNMOUNT" GOTO :EOF 2. And in the OOBE.CMD file: Code: regedit /s %systemroot%\setup\scripts\acer.reg %systemroot%\setup\scripts\system.cmd