tsolaaa Posted October 10, 2014 Share Posted October 10, 2014 Hey Guys, I need to inject a batch file into the all-in-one setup. I am using the ISO that is created by WinTool Kit over a PXE server so the silent installs set inside the app do not run like they should. Instead, I have told the app to place the files in the c:/ directory and then I would like to somehow have my install run my batch script to run the installs automatically. I have been unable to find any solutions yet. Maybe a custom .reg file inserted into the tweaks section that tells the OS to run the .bat file on the first startup? Anyone have any suggestions? Quote Link to comment Share on other sites More sharing options...
kalimergo Posted October 11, 2014 Share Posted October 11, 2014 sources/$OEM$/$$/Setup/scripts/SetupComplete.cmd Quote Link to comment Share on other sites More sharing options...
tsolaaa Posted October 13, 2014 Author Share Posted October 13, 2014 sources/$OEM$/$$/Setup/scripts/SetupComplete.cmd Thank you! But where exactly do I edit this? That path doesn't exist inside the extracted ISO I am using WinToolKit with. If this helps, I am using SERVA to deploy the installs over PXE. The SERVA root folder has "/$OEM$/$$" should I create the "setup/scripts/" and just add the batch file there and rename it to "SetupComplete.cmd" ? Quote Link to comment Share on other sites More sharing options...
kalimergo Posted October 13, 2014 Share Posted October 13, 2014 (edited) yes the root folder go to Windows/Setup (folder already exist when you extracted the iso) but create "S"etup with big s, sometimes syntax is important... or create scripts/SetupComplete.cmd in Windows/Setup folder directly in your iso. important: SetupComplete.cmd works when "setup is checking video performance" comes silently but some tweaks needs to run after for works. If you want run bat file after welcome screen, it's possible to put this command in SetupComplete.cmd (mybat.bat is our bat file in Setup\scripts folder) cmdow @ /HID SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Install bat..." /f REG ADD %KEY%\001 /VE /D "Install bat" /fREG ADD %KEY%\001 /V 1 /D "%systemroot%\Setup\scripts\mybat.bat" /fExit Edited October 13, 2014 by kalimergo Quote Link to comment Share on other sites More sharing options...
tsolaaa Posted October 14, 2014 Author Share Posted October 14, 2014 yes the root folder go to Windows/Setup (folder already exist when you extracted the iso) but create "S"etup with big s, sometimes syntax is important... or create scripts/SetupComplete.cmd in Windows/Setup folder directly in your iso. important: SetupComplete.cmd works when "setup is checking video performance" comes silently but some tweaks needs to run after for works. If you want run bat file after welcome screen, it's possible to put this command in SetupComplete.cmd (mybat.bat is our bat file in Setup\scripts folder) cmdow @ /HID SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Install bat..." /f REG ADD %KEY%\001 /VE /D "Install bat" /fREG ADD %KEY%\001 /V 1 /D "%systemroot%\Setup\scripts\mybat.bat" /fExit I'm sorry, I don't fully understand. When I extract the ISO there is no "Windows" folder. There is a "Sources" folder. I'm using WinTool Kit to integrate everything and SERVA to deploy over PXE. I tried using the "Files" tab inside the application to place the SetupComplete.cmd file inside "C:\Windows\Setup\Scripts" but it is still not running. I have checked the log file and it doesn't even attempt to run it. Maybe it's placing the file after windows looks for it? I just tried placing the SetupComplete.cmd inside the "$OEM$\$$\Setup\Scripts" within the SERVA root directory and it still doesn't run. Where do I place all those registry entries and where do I place them inside the WinTool Kit App? Quote Link to comment Share on other sites More sharing options...
kalimergo Posted October 14, 2014 Share Posted October 14, 2014 (edited) Okay one solution: 1- create in sources directory this 4 folders. ($OEM$/$$/Setup/scripts)2- create SetupComplete.cmd in scripts folder with this lines cmdow @ /HID SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Install bat..." /f REG ADD %KEY%\001 /VE /D "Install bat" /fREG ADD %KEY%\001 /V 1 /D "%systemroot%\Setup\scripts\mybat.bat" /fExit 3- rename your bat file as "mybat.bat" and put it in scripts directory too Edited October 14, 2014 by kalimergo Quote Link to comment Share on other sites More sharing options...
tsolaaa Posted October 15, 2014 Author Share Posted October 15, 2014 Okay one solution: 1- create in sources directory this 4 folders. ($OEM$/$$/Setup/scripts)2- create SetupComplete.cmd in scripts folder with this lines cmdow @ /HID SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Install bat..." /f REG ADD %KEY%\001 /VE /D "Install bat" /fREG ADD %KEY%\001 /V 1 /D "%systemroot%\Setup\scripts\mybat.bat" /fExit 3- rename your bat file as "mybat.bat" and put it in scripts directory too So I tried both methods above. I first put these files into the correct directory inside the \Sources\Scripts\...in the deployment folder. I also opened the install.wim and placed the files actually inside the c:\Windows\Setup\Scripts Both have no effect. There is nothing in Setupact.txt log either.... Maybe the UAC is preventing the applications from installing automatically? Quote Link to comment Share on other sites More sharing options...
kalimergo Posted October 15, 2014 Share Posted October 15, 2014 (edited) Commands in the Setupcomplete.cmd file are executed with local system privilege. http://technet.microsoft.com/en-us/library/cc766314%28v=ws.10%29.aspx that is the problem... Edited October 15, 2014 by kalimergo Quote Link to comment Share on other sites More sharing options...
DougSchuess Posted December 12, 2014 Share Posted December 12, 2014 To get around these problems, I suggest you convert your batch/command file to an SFX (using something like 7zip SFX maker) and place the SFX in silent install. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.