Jump to content

SetupComplete.cmd does not work


Recommended Posts

Hi forum.
After installation, Windows does not start HManager (automatic installer apps, pseudo-wpi).

What was done was to write 2
cmd files to start the installer, one is setupcomplete.cmd,
which is responsible for setting a preset and call another cmd after installation.


 

@echo off START /B /WAIT %systemroot%\setup\scripts\CCCP.exeSTART /B /WAIT %systemroot%\setup\scripts\MaeOptim.exeregedit /s %systemroot%\setup\scripts\SP.reg reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d 00000000 /f REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V "Iniciar ToolTip1" /D "reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v TaskbarNoNotification /f" /fREG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V "Iniciar ToolTip2" /D "reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v TaskbarNoNotification /f" /fREG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V "Iniciar ToolTip3" /D "reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v EnableBalloonTips /f" /f for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) doif exist %%i:\sources\install.wim set CDROM=%%i:Start %cdrom%\Manager\Start.cmddel %0 GOTO EXIT:EXIT

And Start.cmd running the installer itself

@echo off for %%i in (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 %%i:\bootmgr set CDROM=%%i:echo Found CD-Rom as drive %CDROM% '--- start %cdrom%\Manager\RunOnce.exe'--- start %cdrom%\Manager\H.exe  GOTO EXIT:EXIT

at first sight that one searches \install.wim and one in \bootmgr, it may be the error there?

(Sorry for my bad english, i'm using google translate) :blushing:

Link to comment
Share on other sites


You need to number your Reg Adds for proper install sequence like so:

 

~DP  :whistle:

 

Code Snippet:



@echo off
:: Unattended Install Deployment and Configurator for Windows(R) 7 Edition X64
:: Note: Installs applications at end of OOBE process/before first logon.

::POST INSTALLS-(root of cd/usb)::
set key=hklm\software\microsoft\windows\currentversion\runonceex
for %%i in (d e f g h i j k l m n o) do if exist %%i:\sources\install.wim set cdrom=%%i:

reg add %key%\02 /V 1 /D "%cdrom%\apps\7zx64.msi /qn" /f
reg add %key%\04 /V 1 /D "regedit /s cdrom%\apps\Twks7x64.reg" /f
reg add %key%\06 /V 1 /D "%cdrom%\apps\Ownership.cmd" /f
reg add %key%\08 /V 1 /D "Cscript.exe //nologo "%cdrom%\apps\Favs.vbs" /f
reg add %key%\10 /V 1 /D "%cdrom%\apps\Silverlight.sfx.exe" /f
reg add %key%\12 /V 1 /D "%cdrom%\apps\XnView_1.97.sfx.exe" /f
reg add %key%\14 /V 1 /D "%cdrom%\apps\cleanup.cmd" /f
reg add %key%\16 /V 1 /D "%cdrom%\apps\reboot.exe" /f


Link to comment
Share on other sites

 

You need to number your Reg Adds for proper install sequence like so:
 
~DP  :whistle:
 
Code Snippet:
@echo off:: Unattended Install Deployment and Configurator for Windows(R) 7 Edition X64:: Note: Installs applications at end of OOBE process/before first logon.::POST INSTALLS-(root of cd/usb)::set key=hklm\software\microsoft\windows\currentversion\runonceexfor %%i in (d e f g h i j k l m n o) do if exist %%i:\sources\install.wim set cdrom=%%i:reg add %key%\02 /V 1 /D "%cdrom%\apps\7zx64.msi /qn" /freg add %key%\04 /V 1 /D "regedit /s cdrom%\apps\Twks7x64.reg" /freg add %key%\06 /V 1 /D "%cdrom%\apps\Ownership.cmd" /freg add %key%\08 /V 1 /D "Cscript.exe //nologo "%cdrom%\apps\Favs.vbs" /freg add %key%\10 /V 1 /D "%cdrom%\apps\Silverlight.sfx.exe" /freg add %key%\12 /V 1 /D "%cdrom%\apps\XnView_1.97.sfx.exe" /freg add %key%\14 /V 1 /D "%cdrom%\apps\cleanup.cmd" /freg add %key%\16 /V 1 /D "%cdrom%\apps\reboot.exe" /f

 

 

still don't working :no:

PS. the file is for a x86 windows.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...