Digital Art Zone

 
     
Batch Files for Auto Installing Bit Rock Installers
Posted: 24 July 2012 05:37 PM   [ Ignore ]
Active Member
RankRank
Total Posts:  728
Joined  2003-10-09

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 filesplease 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 />install_list.txt 

FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%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 filesplease 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 />install_list.txt 

FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%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 filesplease 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 />install_list.txt 

FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%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 filesplease 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 />install_list.txt 

FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%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.

 Signature 

My Gallery

Profile
 
 
Posted: 27 July 2012 11:23 AM   [ Ignore ]   [ # 1 ]
Active Member
RankRank
Total Posts:  728
Joined  2003-10-09

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 directoriesplease wait ... 
IF 
NOT EXIST install_list.txt DIR *.exe />install_list.txt 
FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
XCOPY i:\DAZ\DS4Library i:\DAZ\inst_%%////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 filesplease 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 />install_list.txt 
FOR /"eol=; tokens=1,2* " %%i in (install_list.txt) DO ( 
MKDIR inst_%%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.

 Signature 

My Gallery

Profile
 
 
Posted: 01 September 2012 06:53 PM   [ Ignore ]   [ # 2 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07

Thank you for sharing, but in addition to FixMyPCMike, it would have been nice of you to provide a link back to the original thread and give proper credit to Tugspx who wrote the original script, and perhaps also to me who you seemed to have literally copied the entire script from (http://forumarchive.daz3d.com/viewtopic.php?p=3243252#3243252).

Given you seem literally only to have changed the installation folder, I’m curious as to how you managed to “tinker these scripts together to get them to work” ? It must have taken ages (read=minutes)!

angry

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 23 November 2012 10:05 AM   [ Ignore ]   [ # 3 ]
New Member
Total Posts:  9
Joined  2006-02-08

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

Profile
 
 
Posted: 20 January 2013 05:55 AM   [ Ignore ]   [ # 4 ]
Active Member
RankRank
Total Posts:  401
Joined  2012-04-01

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.

 Signature 

Everything about Carrara: http://www.carraracafe.com/

Profile