Batch and Post-Setup

tistou77

Member
Hello

I would like to add a batch in this section, for settings I can leave empty ?
I just want the batch to be lauched after installation

Another question, this batch contains redirects for .reg files (eg: regedit.exe /s test.reg)
Will these .reg files be applied ?

Or is it better to put a command line to launch these batch after installation ?

Thanks
 
Last edited:

tistou77

Member
I tried with a command line to launch the batch and it does not work
I see the command window open very briefly but the settings are not applied
 

Kasual

Well-Known Member
in Post-Setup this would work:

command:
call

parameters:
filename.ext (your cmd file)
 

tistou77

Member
I have an error sihost.exe (Unknown Hard Error) at the end of the installation
But after a few minutes, the installation ends but the desktop is all black

I have several batch files, some return to .reg files (eg: regedit.exe / s test.reg) with the SetAcl.exe for permissions in the folder
And another has in addition a command to restart explorer.exe after the reg files are applied

Maybe not possible to "call" all these batches at the same time
I tried in Live the SetupComplete and it does not work, the batch one by one works fine
 

tistou77

Member
it is the batch that contains the command to restart explorer.exe that causes the error.
and the other batches are not applied (those with setacl.exe, unrecognized)
There is not a parameter for the batch to be "launched" once the installation is finished (arrived on the desktop) ?

In the parameters, I indicated the full path of the file, it's not good ?

Thanks
 
Last edited:

nuhi

NTLite developer
Staff member
@tistou77, to add a batch file just add it as a file, not a command.

To add REG file, same, as a file, not that no users exist yet at the moment of execution, so HKCU will be ignored (applied only to the SYSTEM user).

If your destinations called from the batch are not where you expect them, then of course it won't work.
To debug that add ECHO %yourpaths% in the batch, with PAUSE commands to check yourself.
Press SHIFT+F10 to bring up command line during checkups.
 

tistou77

Member
@nuhi, ok I'll test but the .reg file is part of the batch file (command in the batch file to change the permissions of the registry keys I want to modify)
I can not separate the batch and the .reg?
Example:

Code:
@echo off
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd" -ot reg -actn setowner -ownr "n:TISTOU-PC\tistou"
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd" -ot reg -actn ace -ace "n:TISTOU-PC\tistou;p:full"
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd" -ot reg -actn setowner -ownr "n:TISTOU-PC\tistou"
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd" -ot reg -actn ace -ace "n:TISTOU-PC\tistou;p:full"
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\cmd" -ot reg -actn setowner -ownr "n:TISTOU-PC\tistou"
setacl.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\cmd" -ot reg -actn ace -ace "n:TISTOU-PC\tistou;p:full"
regedit.exe /s cmd.reg

And the folder include the batch file, the reg file and SetACL.exe

I managed to group all the batch (.cmd / .bat) in a single batch, it works in Live

Thanks
 

tistou77

Member
My batch file works in Live (launched from Windows\Setup\Script\SetupComplete.cmd) but the part to restart the explorer.exe does not work when the file is integrated with NTLite
 

Kasual

Well-Known Member
My batch file works in Live (launched from Windows\Setup\Script\SetupComplete.cmd) but the part to restart the explorer.exe does not work when the file is integrated with NTLite

explorer.exe is not loaded yet at the post-setup step.
 

nuhi

NTLite developer
Staff member
@tistou77, since your registry commands do not rely on file location, they are safe to execute during setup.
There is no need to restart explorer during setup, just remove that piece.
 

tistou77

Member
@nuhi, But these registry keys are "protected" how to execute them during installation?
For the explorer.exe, I restart it in Live to apply the changes (other registry keys) without having to restart
These registry keys can not be integrated in Offline (installation error)
I could try to do during the installation, but I do not know if it will work
 
Top