UBCD4Win Forums: Script Building Of Ubcd4Win - UBCD4Win Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Script Building Of Ubcd4Win Is this doable?

#1 User is offline   loser_dude Icon

  • Newbie
  • Pip
    • Group: Members
    • Posts: 5
    • Joined: 02-December 09

    Posted 02 December 2009 - 10:56 AM

    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.
    0

    #2 User is offline   KCarney Icon

    • Regular Member
    • PipPipPip
      • Group: BETA Tester
      • Posts: 231
      • Joined: 29-January 07
      • Location:New York

      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
      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.
      0

      #3 User is offline   pcuser Icon

      • Project Programmer
      • PipPipPipPipPipPipPip
        • Group: Moderator & Development
        • Posts: 3,889
        • Joined: 20-November 04
        • Gender:Male
        • Location:Kneebrasskee

        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
        0

        #4 User is offline   loser_dude Icon

        • Newbie
        • Pip
          • Group: Members
          • Posts: 5
          • Joined: 02-December 09

          Posted 03 December 2009 - 11:06 AM

          Thanks for the quick response. That looks like exactly what I need to know. I assume this will all have to be done when logged in, but that's no biggie.
          0

          #5 User is offline   KCarney Icon

          • Regular Member
          • PipPipPip
            • Group: BETA Tester
            • Posts: 231
            • Joined: 29-January 07
            • Location:New York

            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.
            0

            #6 User is offline   loser_dude Icon

            • Newbie
            • Pip
              • Group: Members
              • Posts: 5
              • Joined: 02-December 09

              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.
              0

              #7 User is offline   KCarney Icon

              • Regular Member
              • PipPipPip
                • Group: BETA Tester
                • Posts: 231
                • Joined: 29-January 07
                • Location:New York

                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)?
                

                0

                #8 User is offline   loser_dude Icon

                • Newbie
                • Pip
                  • Group: Members
                  • Posts: 5
                  • Joined: 02-December 09

                  Posted 08 December 2009 - 03:08 PM

                  Actually, I don't use VIPRE at all. Nothing against the application and its affiliates.
                  0

                  #9 User is offline   KCarney Icon

                  • Regular Member
                  • PipPipPip
                    • Group: BETA Tester
                    • Posts: 231
                    • Joined: 29-January 07
                    • Location:New York

                    Posted 08 December 2009 - 03:42 PM

                    Just making sure, I had to modify a line in that particular script to get it working discretely. Could you post the contents of your modified MBAM script so anyone else looking to do this can via this post?
                    0

                    #10 User is offline   loser_dude Icon

                    • Newbie
                    • Pip
                      • Group: Members
                      • Posts: 5
                      • Joined: 02-December 09

                      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.

                      :: 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.
                      0

                      Page 1 of 1
                      • You cannot start a new topic
                      • You cannot reply to this topic

                      1 User(s) are reading this topic
                      0 members, 1 guests, 0 anonymous users