A few bugs in "register_file_ext.bat" from the 4.6.0.18 zip install files

ChrisLockChrisLock Posts: 0
edited December 1969 in Daz Studio Discussion

I have never used Daz Studio before.
Today, I downloaded and installed the Daz 3D Install Manager,
which in turn downloaded the Daz Studio 4.6 (Win 32-bit) zip / dsx files
- which then got extracted and used to install Daz Studio 4.6.0.18.

Since I am very curious when I install programs, I usually check afterwards what's been done / added / changed.
I noticed that in the .dsx manifest file (the 237 KB one), at the end, it said

And when I looked at that file, it was apparently some bugs in it:

First:

The goal is obviously to make several
[***file\shell\\open\command\] keys with

"C:\Program Files (x86)\DAZ 3D\DAZStudio4\DAZStudio.exe" "%1"

(again, the 32-bit variant here.)

However, in the registry, this instead becomes

"C:\Program Files (x86)\DAZ 3D\DAZStudio4\DAZStudio.exe" ""

The reason why the %1 disapears is that percents must be doubled in a batch file.
E.g. see http://windowsitpro.com/windows-server/how-can-i-use-percent-symbol-batch-file

So the code should be like

REG ADD "HKEY_CLASSES_ROOT\dazfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

instead of
REG ADD "HKEY_CLASSES_ROOT\dazfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%1\"" /f


Second:

The "DAZ Script 2 (Encrypted)" section reads like this:

REG ADD "HKEY_CLASSES_ROOT\dseile" /ve /d "DAZ Script 2 (Encrypted)" /f
REG ADD "HKEY_CLASSES_ROOT\dseile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,6" /f
REG ADD "HKEY_CLASSES_ROOT\dsefile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

As you see, there is an inconsistency - the two first lines use "dseile" while the last one uses "dsefile".
Since I have not used Daz before, I'm not sure, but - I would guess that "dsefile" is the correct (intended) one..?
If that is the case, in addtion to changing the 2 "dseile" keyname entries into "dsefile" in this "register_file_ext.bat",
it will also be needed in the "unregister_file_ext.bat" - i.e.:

REG DELETE "HKEY_CLASSES_ROOT\dseile" /va /f

into
REG DELETE "HKEY_CLASSES_ROOT\dsefile" /va /f


Third:

Shouldn't there also be some entries that assigns the actual filename extensions..? I.e. like this..:


REG ADD "HKEY_CLASSES_ROOT\.daz" /ve /d "dazfile" /f
REG ADD "HKEY_CLASSES_ROOT\.ds" /ve /d "dsfile" /f
REG ADD "HKEY_CLASSES_ROOT\.dsb" /ve /d "dsbfile" /f
REG ADD "HKEY_CLASSES_ROOT\.dsa" /ve /d "dsafile" /f
REG ADD "HKEY_CLASSES_ROOT\.dse" /ve /d "dsefile" /f
REG ADD "HKEY_CLASSES_ROOT\.dsf" /ve /d "dsffile" /f
REG ADD "HKEY_CLASSES_ROOT\.duf" /ve /d "duffile" /f
REG ADD "HKEY_CLASSES_ROOT\.dsx" /ve /d "dsxfile" /f
REG ADD "HKEY_CLASSES_ROOT\.dsi" /ve /d "dsifile" /f

Putting all these fixes together - I created my own variant of this:

@ECHO OFF
SET curDir=%~dp0
IF %curDir:~-1%==\ SET curDir=%curDir:~0,-1%

REG ADD "HKEY_CLASSES_ROOT\.daz" /ve /d "dazfile" /f
REG ADD "HKEY_CLASSES_ROOT\dazfile" /ve /d "DAZ Studio Scene" /f
REG ADD "HKEY_CLASSES_ROOT\dazfile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,2" /f
REG ADD "HKEY_CLASSES_ROOT\dazfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.ds" /ve /d "dsfile" /f
REG ADD "HKEY_CLASSES_ROOT\dsfile" /ve /d "DAZ Script (Ascii)" /f
REG ADD "HKEY_CLASSES_ROOT\dsfile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,3" /f
REG ADD "HKEY_CLASSES_ROOT\dsfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dsb" /ve /d "dsbfile" /f
REG ADD "HKEY_CLASSES_ROOT\dsbfile" /ve /d "DAZ Script (Binary)" /f
REG ADD "HKEY_CLASSES_ROOT\dsbfile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,4" /f
REG ADD "HKEY_CLASSES_ROOT\dsbfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dsa" /ve /d "dsafile" /f
REG ADD "HKEY_CLASSES_ROOT\dsafile" /ve /d "DAZ Script 2 (Ascii)" /f
REG ADD "HKEY_CLASSES_ROOT\dsafile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,5" /f
REG ADD "HKEY_CLASSES_ROOT\dsafile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dse" /ve /d "dsefile" /f
REG ADD "HKEY_CLASSES_ROOT\dsefile" /ve /d "DAZ Script 2 (Encrypted)" /f
REG ADD "HKEY_CLASSES_ROOT\dsefile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,6" /f
REG ADD "HKEY_CLASSES_ROOT\dsefile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dsf" /ve /d "dsffile" /f
REG ADD "HKEY_CLASSES_ROOT\dsffile" /ve /d "DSON Support File" /f
REG ADD "HKEY_CLASSES_ROOT\dsffile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,7" /f
REG ADD "HKEY_CLASSES_ROOT\dsffile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.duf" /ve /d "duffile" /f
REG ADD "HKEY_CLASSES_ROOT\duffile" /ve /d "DSON User File" /f
REG ADD "HKEY_CLASSES_ROOT\duffile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,8" /f
REG ADD "HKEY_CLASSES_ROOT\duffile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dsx" /ve /d "dsxfile" /f
REG ADD "HKEY_CLASSES_ROOT\dsxfile" /ve /d "DAZ Shared XML" /f
REG ADD "HKEY_CLASSES_ROOT\dsxfile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,9" /f
REG ADD "HKEY_CLASSES_ROOT\dsxfile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

REG ADD "HKEY_CLASSES_ROOT\.dsi" /ve /d "dsifile" /f
REG ADD "HKEY_CLASSES_ROOT\dsifile" /ve /d "DAZ Studio Layered Image" /f
REG ADD "HKEY_CLASSES_ROOT\dsifile\DefaultIcon" /ve /d "%curDir%\DAZStudio.exe,10" /f
REG ADD "HKEY_CLASSES_ROOT\dsifile\shell\open\command" /ve /d "\"%curDir%\DAZStudio.exe\" \"%%1\"" /f

Comments

  • Richard HaseltineRichard Haseltine Posts: 97,358
    edited December 1969

    Moved to DAZ Studio Discussions - developer Discussions is for DAZ Studio scripting. Though you might be better posting in one of the threads on the DAZ Install Manager, or making a bug report.

  • rbtwhizrbtwhiz Posts: 2,187
    edited December 1969

    Thank you for the feedback and for the time you've taken to provide it. This has been fixed for future builds.

    -Rob

Sign In or Register to comment.