First off, props to everyone who's contributed to this project. I've saved a number of computers from various ailments, and using UBCD4Win made my work much easier. Now, to the question at hand. Would it be possible to script the building of UBCD4Win? As in, have it check for updates for the various enabled plugins that require updates, then automatically build a new ISO? Ideally, the end result of this would be a daily update, which would then, with some other voodoo, feed a PXE server. But, I can settle for just the daily build. Now, I believe something like that could be done through something like AutoIT, but I was wondering if that would ever be inbuilt.
Page 1 of 1
Script Building Of Ubcd4Win Is this doable?
#2
Posted 02 December 2009 - 03:00 PM
I use batch scripts to accomplish this:
directory structure as follows
C:\UB\UBCD4Win
C:\UB\UBCD
C:\UB\Scripts
All of my scripts obviously reside in C:\UB\Scripts
!Build Entire UBCD Project.cmd
UBCD4WIN_Update_UBCD_defs.cmd
UBCD4WIN_Build_UBCD.cmd
UBCD4WIN_Update_UBCD4Win_defs.cmd
UBCD4WIN_Build_UBCD4Win.cmd
Only 1 problem, either the VIPRE or Antivir script require you to type Y and hit enter. It's a start at least.
directory structure as follows
C:\UB\UBCD4Win
C:\UB\UBCD
C:\UB\Scripts
All of my scripts obviously reside in C:\UB\Scripts
!Build Entire UBCD Project.cmd
Call c:\UB\Scripts\UBCD4WIN_Update_UBCD_defs.cmd call c:\UB\Scripts\UBCD4WIN_Build_UBCD.cmd call c:\UB\Scripts\UBCD4WIN_Update_UBCD4Win_defs.cmd call c:\UB\Scripts\UBCD4WIN_Build_UBCD4Win.cmd
UBCD4WIN_Update_UBCD_defs.cmd
cd C:\UB\UBCD\files\ubcd\tools\win32\antivirus call avira.cmd call clamav.cmd call fprot.cmd cd C:\UB\Scripts
UBCD4WIN_Build_UBCD.cmd
call C:\UB\UBCD\files\ubcd\tools\win32\ubcd2iso\ubcd2iso.cmd "c:\UB\ubcd\files" "C:\UB\UBCD4WIN\plugin\Multiboot-003\UBCD5\files\ubcd5.iso"
UBCD4WIN_Update_UBCD4Win_defs.cmd
Call C:\UB\UBCD4WIN\plugin\AntiSpyware\a2free\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiSpyware\CWShredder\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiSpyware\SUPERAntispyware\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiSpyware\Vipre-PC-Rescue\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiVirus\Antivir9\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiVirus\avast\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiVirus\mcafee\get_update.cmd Call C:\UB\UBCD4WIN\plugin\AntiVirus\stinger\get_update.cmd
UBCD4WIN_Build_UBCD4Win.cmd
cd C:\UB\UBCD4WIN call "!Start_Autobuild(click-me).cmd"
Only 1 problem, either the VIPRE or Antivir script require you to type Y and hit enter. It's a start at least.
#3
Posted 02 December 2009 - 03:09 PM
Quote
Would it be possible to script the building of UBCD4Win?
Yes. You can run UBCD4WinBuilder.exe with the -auto parameter from a command prompt or script.
Quote
with some other voodoo
Sorry, UBCD4Win is incompatible with voodoo.
If you're afraid of taking any chances then the chances are great that you will never learn anything
Multiboot Plugins - UBUSB (Ultimate Boot USB) - EzPcFix - RootKitty - Network Configuration Utility - UnIsoFS - A Small Linux Distro - SELogger - HashME - WSock - My Paypal
Multiboot Plugins - UBUSB (Ultimate Boot USB) - EzPcFix - RootKitty - Network Configuration Utility - UnIsoFS - A Small Linux Distro - SELogger - HashME - WSock - My Paypal
#5
Posted 03 December 2009 - 11:09 AM
If you can fix the required used input prompted by one of the anti-malware update scripts then you should be able to add !Build Entire UBCD Project.cmd to the windows task scheduler, which may or may not work when not logged in. Test it out and let us know.
#6
Posted 08 December 2009 - 12:37 PM
So far so good. I didn't have to fix any inputs, or at least for anything listed. It's going through and downloading and applying updates just fine. I did have to do some tweaking with MBAM. Too many exits, pauses, and ends in get_update.cmd. And then the last pause in !Start_Autobuild(click-me).cmd. I haven't ran it as a scheduled task yet, and I still need to change it to copy the final product to a network share, but that'll be easy enough.
#7
Posted 08 December 2009 - 01:37 PM
Ah good. The VIPRERescue update script didn't require any tweaking?
File Downloader - Version 1.08 (build 54.2) Downloads a file from a HTTP or a FTP server. Copyright (c) 2004-2006, Noël Danjou <[email protected]>. Protocol: HTTP Method: GET Server: live.sunbeltsoftware.com Port: 80 Location: http://www.sunbeltsoftware.com/Evaluation/Rescue-CD/VIPRERescue5550.ex e Redirecting... Protocol: HTTP Method: GET Server: www.sunbeltsoftware.com Port: 80 VIPRERescue.exe: 57.1 MB downloaded. 57.1 MB in 1 file(s) downloaded. 0 error(s). Done. Archive: C:/UB/UBCD4WIN/plugin/AntiSpyware/Vipre-PC-Rescue/files/VIPRERescue.ex e inflating: blah blah blah extracting: blah blah blah C:\UB\UBCD4WIN\plugin\AntiSpyware\Vipre-PC-Rescue\files\Definitions\*.*, Are you sure (Y/N)?
#10
Posted 09 December 2009 - 08:41 AM
Basically all I did was cut out one pause, and I think an exit as well. The last line in the :end section is the key.
I also had to run the copy ISO as a separate scheduled task, as the exit switch on building UBCD4Win ended the whole process, but that's no biggie. Also, the whole process ran just fine as a scheduled task, however the computer was still logged in for that.
:: MalwareBytes Anti-Malware Update CMD @echo off setlocal ENABLEEXTENSIONS :: rem Change current drive and path to where the CMD script is located %~d0 cd /D %~dp0 :_setpath FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Malwarebytes' Anti-Malware" /v "InstallPath"') DO (SET mbampath=%%B) if "%mbampath%"=="" goto _Error echo.&echo Downloading Updates.... cd /D "%mbampath% mbam /runupdate echo done.&echo. echo.&echo Updating plugin dir.... cd /D %~dp0 if exist "%ALLUSERSPROFILE%\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" copy "%ALLUSERSPROFILE%\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" ".\files\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" if exist "%ALLUSERSPROFILE%\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" copy "%ALLUSERSPROFILE%\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" ".\files\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" if exist "%ALLUSERSPROFILE%\Anwendungsdaten\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" copy "%ALLUSERSPROFILE%\Anwendungsdaten\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" ".\files\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\news.txt" if exist "%ALLUSERSPROFILE%\Anwendungsdaten\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" copy "%ALLUSERSPROFILE%\Anwendungsdaten\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" ".\files\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware\rules.ref" echo done.&echo. goto end :_Error cls echo The MalwareBytes Anti-Malware files were not found echo. echo Please install MalwareBytes Anti-Malware before attempting to Update again. echo. echo.&pause&exit :end echo.&echo Process Complete.&echo endlocal
I also had to run the copy ISO as a separate scheduled task, as the exit switch on building UBCD4Win ended the whole process, but that's no biggie. Also, the whole process ran just fine as a scheduled task, however the computer was still logged in for that.
Page 1 of 1