Post-Installation Question on reg files

tistou77

Member
Hi

I have a small question with the Post-installation
I have a .bat file, which points to several .reg files
I wanted to integrate this bat file into the Post Installation, but when it will be executed after the installation, the linked reg files will not be applied

A solution for these reg files to be applied ?

Thanks
 
If there is no security issues, after running the reg import, try adding time in the next line under reg import.

timeout /t 99 /nobreak
 
Or I thought that by adding in the bat file, the path where the reg files are

regedit.exe /s D:\Tweaks\test.reg (instead of regedit.exe /s test.reg)

It could work ?
 
Or I thought that by adding in the bat file, the path where the reg files are

regedit.exe /s D:\Tweaks\test.reg (instead of regedit.exe /s test.reg)

It could work ?
Adding the path is needed when files are in different location from where the command is running, another option is to change the location to the reg files:
d:
cd \
cd Tweaks

And this would be the command:
regedit.exe /s test.reg
 
tistou77 Why dont you just bat the reg files? Use Reg Converter by Sordum, it converts to bat and vbs, edit the commands into a single file, i put a 1 second timeout between registry comands then a restart.
 
I use several reg files that I "load" by the bat file
Each reg file is for a precise "task"

But it is true that I will be able to transform reg files into bat

Thanks ;)
 
So I tested with .bat (reg converts to bat with Reg Converter)
After embedding the bat files with NTLite (Post-Installation), after installation the bat files are not applied, and besides the setup directories is not even deleted

A problem with the files ?

In ISO, I have the files and script directories in sources \ $ OEM $ \ $$ \ Setup
These directories are well "copied" in Windows \ Setup

The content of SetupComplete

@echo off
powercfg -h off
net accounts /maxpwage:unlimited
call "%WINDIR%\Setup\Files\Divers_10.cmd"
call "%WINDIR%\Setup\Files\Edge.bat"
call "%WINDIR%\Setup\Files\HDTune.bat"
call "%WINDIR%\Setup\Files\IE.bat"
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"

and the contents of my bat files looks like this

@echo off
REM ;Border
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionHeight" /t REG_SZ /d "-300" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionWidth" /t REG_SZ /d "-495" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "PaddedBorderWidth" /t REG_SZ /d "-45" /f

Thanks for your help
 
Are these being applied?
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionHeight" /t REG_SZ /d "-300" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionWidth" /t REG_SZ /d "-495" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "PaddedBorderWidth" /t REG_SZ /d "-45" /f
 
No ;)

But before I very briefly saw the command prompt window open and close (just after installation)
There I do not see anything
 
I could be wrong but at that stage during setup then a user account hasnt been created, only the administraor account exists somewhere.
abbodi86 and Kas were helping me on some registry things in my Capture thread, i think there is a user master location, similar to ControlSet001, but i dont know what it is.
 
If I run the bat files in Windows\Setup\Files manually, it's ok
I feel that files are not "called" after installation

By the way, powercfg commands do not run either
Before I very briefly saw the command prompt window open and close (just after installation)
There I do not see anything

Besides, the SetupComplete file should not be "called" because the setup directory is not deleted (NTLite 6790)
 
Powercfg usually works and ive been setting an active powerplan and a couple of its settings and they apply ok.
Try using powercfg /h off
/h is a more agressive setting(thanks pmikep ).
 
Try pasting the contents of
call "%WINDIR%\Setup\Files\Divers_10.cmd"
call "%WINDIR%\Setup\Files\Edge.bat"
call "%WINDIR%\Setup\Files\HDTune.bat"
call "%WINDIR%\Setup\Files\IE.bat"
into setupcomplete.cmd.

Ive not had an errors adding multiple commands to it, its prolly because you are calling on other bat/cmd's.
 
Are these being applied?
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionHeight" /t REG_SZ /d "-300" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "CaptionWidth" /t REG_SZ /d "-495" /f
Reg.exe add "HKCU\Control Panel\Desktop\WindowMetrics" /v "PaddedBorderWidth" /t REG_SZ /d "-45" /f
Yes, you should find the data in the key HKEY_USERS\.Default
You should use logon commands to work the way you want.

I could be wrong but at that stage during setup then a user account hasnt been created, only the administraor account exists somewhere.
The system account is running at that stage.

If I run the bat files in Windows\Setup\Files manually, it's ok
I feel that files are not "called" after installation

By the way, powercfg commands do not run either
Before I very briefly saw the command prompt window open and close (just after installation)
There I do not see anything

Besides, the SetupComplete file should not be "called" because the setup directory is not deleted (NTLite 6790)
Use call instead of only runing the batch file and at the end of every script add exit /b, inside every batch file. When you use the call command setupcomplete batch pauses until the batch file called ends.

If setup directory gets deleted, setupcomplete.cmd is deleted, at the end of the setup a file named state.ini is created State folder, inside the Setup folder.
Script folder and it's contents is deleted once setupcomplete.cmd finishes, check the last line in setupcomplete.cmd once the process has finished, there will be the command that deletes the script folder, not seen in the Post Setup page.
 
Back
Top