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.


