Batch Files for Auto Installing Bit Rock Installers

Jason GalterioJason Galterio Posts: 2,562

I knew it was coming, but last night was the straw that broke the camels back. I needed to start reinstalling all of my content files. Which meant running a couple of thousand installers one by one.


I was determined to find a way around this task. I located some batch file excerpts that I had unsuccessfully toyed with in the past. This time I was either going to get them to work or I was just going to take a break from DAZ for a while.


Happily, I did get the batch file to work to my satisfaction. And I figured I should share them. I do want to give credit to the original author, from which I tinkered these together. I believe that was FixMyPCMike, but I could be mistaken.


These batch files are ordered with what works with the most recent installers first, then stepping backwards. These will install each installer to its own directory, named the same as the installer's file name. I did this to make it easier to ZIP up the individual files and also to make large batches of files easy to recognize after the installers are done. Each directory has a "inst_" string added to the start of the directory (so that the batch file doesn't get confused by the presence of the original install file with the same name).


@ECHO OFF 
CLS 
ECHO Installing DAZ Studio files, please wait ... 

SET options=--mode unattended --unattendedmodeui minimal --accept_license yes --create_uninstaller no
 --create_startmenu_shortcuts no --installdir_content "I:\Reinstalls\inst_%%i" 

IF NOT EXIST installed MKDIR installed 

IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 

FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%i
   %%i %options% 
   IF NOT ERRORLEVEL 1 ( 
      PING 127.0.0.1 -n 2 >NUL 
      MOVE %%i installed >NUL 
      ECHO %%i installed. 
   ) ELSE ( 
      ECHO %%i failed. 
   ) 
) 
  
DEL install_list.txt 
@ECHO Finished installing.


@ECHO OFF 
CLS 
ECHO Installing DAZ Studio files, please wait ... 

SET options=--mode unattended --unattendedmodeui minimal --Uninstaller 0 --installpath "I:\Reinstalls\inst_%%i" 

IF NOT EXIST installed MKDIR installed 

IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 

FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%i
   %%i %options% 
   IF NOT ERRORLEVEL 1 ( 
      PING 127.0.0.1 -n 2 >NUL 
      MOVE %%i installed >NUL 
      ECHO %%i installed. 
   ) ELSE ( 
      ECHO %%i failed. 
   ) 
) 
  
DEL install_list.txt 
@ECHO Finished installing.


The above two batch files will work in an automated fashion. No intervention needed from the user. Successfully completed installers are moved to the install directory. I would suggest that you then compare the completed install directories to insure that all installs completed. Doing a Remove Empty directories will also be helpful to remove the directories that the batch created before the installers ran.


@ECHO OFF 
CLS 
ECHO Installing DAZ Studio files, please wait ... 

SET pathselection="I:\\\\Reinstalls\\\\inst_%%i" 
SET options=--mode win32 --uninstaller 0  --chosenpath "I:\Reinstalls\inst_%%i" --pathselection specify --prefix "I:\Reinstalls\inst_%%i" 

IF NOT EXIST installed MKDIR installed 

IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 

FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%i
   %%i %options% 
   IF NOT ERRORLEVEL 1 ( 
      PING 127.0.0.1 -n 2 >NUL 
      MOVE %%i installed >NUL 
      ECHO %%i installed. 
   ) ELSE ( 
      ECHO %%i failed. 
   ) 
) 
  
DEL install_list.txt 
@ECHO Finished installing.


@ECHO OFF 
CLS 
ECHO Installing DAZ Studio files, please wait ... 

SET pathselection="I:\\\\Reinstalls\\\\inst_%%i" 
SET options=--mode win32 --Uninstaller 0  --installpath "I:\Reinstalls\inst_%%i" --prefix "I:\Reinstalls\inst_%%i" 

IF NOT EXIST installed MKDIR installed 

IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 

FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%i
   %%i %options% 
   IF NOT ERRORLEVEL 1 ( 
      PING 127.0.0.1 -n 2 >NUL 
      MOVE %%i installed >NUL 
      ECHO %%i installed. 
   ) ELSE ( 
      ECHO %%i failed. 
   ) 
) 
  
DEL install_list.txt 
@ECHO Finished installing.


These last two batches require the user to hit the next button a number of times, as well as accept the user license. Unfortunately the normal options don't work with these older files and there is no fully automated option to use.


Hopefully someone smarter than me can take these files and improve on them.

Post edited by Jason Galterio on

Comments

  • Jason GalterioJason Galterio Posts: 2,562
    edited December 1969

    I wrote another pair of batch files for the BitRock installers that require the base DAZStudio library before the installer will run. Just like the previous files, I really just wanted the content isolated so that I can ZIP the directories up for easy uninstalling / reinstalling.


    First of all, I am using a temporary directory as my install area. In this case it is "I:\DAZ"


    Second of all, since these installers require the base Genesis files to be present, you will need to have those available. In my case I did a clean install of DS4 and pointed the content to a specific directory. I then copied that directory into the temporary directory mentioned above.


    Third of all, after copying the base Genesis contents to the temporary directory, I renamed that directory to "DS4Library". So that means the full location of these files is "I:\DAZ\DS4Library"


    If any of these directories / drives won't work for you, it is a simple matter to change it. I will explain that below each code extract.


    Lastly, to set all of these up, copy the two batch files below and place them into the temporary directory. Also place the installers into this same directory.


    Here is the first batch file. What it does it take an inventory of the batch files to be installed, creates a directory for the install to target, and then copies the base contents into that directory.


    @ECHO OFF 
    CLS 
    ECHO Creating DAZ Studio default directories, please wait ... 
    IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 
    FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
    XCOPY i:\DAZ\DS4Library i:\DAZ\inst_%%i /h /e /i /q
    ) 
    DEL install_list.txt 
    @ECHO Finished installing.


    Now if the specified directories / drives won't work, just change this line:
    XCOPY i:\DAZ\DS4Library i:\DAZ\inst_%%i /h /e /i /q


    Here is the second batch file. What it does is run the installers and directs them into the directories created by the previous batch file.


    @ECHO OFF 
    CLS 
    ECHO Installing DAZ Studio files, please wait ... 
    SET options=--mode unattended --unattendedmodeui minimal --accept_license yes --create_uninstaller no
     --create_startmenu_shortcuts no --installdir_content "I:\DAZ\inst_%%i" 
    IF NOT EXIST installed MKDIR installed 
    IF NOT EXIST install_list.txt DIR *.exe /b >install_list.txt 
    FOR /F "eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
    MKDIR inst_%%i
       %%i %options% 
       IF NOT ERRORLEVEL 1 ( 
          PING 127.0.0.1 -n 2 >NUL 
          MOVE %%i installed >NUL 
          ECHO %%i installed. 
       ) ELSE ( 
          ECHO %%i failed. 
       ) 
    ) 
    DEL install_list.txt 
    @ECHO Finished installing.


    Now if the specified directories / drives won't work, just change this line:
    SET options=--mode unattended --unattendedmodeui minimal --accept_license yes --create_uninstaller no
    --create_startmenu_shortcuts no --installdir_content "I:\DAZ\inst_%%i"


    When all is said and done you will be left with directories with a lot of duplicate files in them. Run a duplicate file finder on these directories by comparing the installer directories to the original base directory. This will leave just the installed files in the individual directories.

  • cridgitcridgit Posts: 1,757
    edited May 2022

    Redacted

    Post edited by cridgit on
  • gheveyghevey Posts: 21
    edited December 1969

    Has anyone tried this one? https://github.com/austinsc/DAZStudioContentRobot
    Seems to work for newer installers some older installers in my collection killed it though.
    Anyone know how to test?
    Thanks

  • 3drendero3drendero Posts: 2,017
    edited December 1969

    Just tried the DAZStudioContentRobot on the Stephanie 4 Starter Pack, while it says Success, there are no extracted files.
    Also getting a warning on each installation about a missing option, so I guess it sucks with older installers.

    Worked fine on Stephanie 5 Elite texture Joanie.

  • Hi,  I feel so stupid asking this question, but i have no idea how to use those scripts. I imagine i have to replace the file directory, thats ok. but what is that install_list.txt? could someone point me to a step by step tutorial?

  • fixmypcmikefixmypcmike Posts: 19,565

    Daz3D doesn't use Bitrock installers for content any more.

Sign In or Register to comment.