Announcement

Collapse
No announcement yet.

Where do I locate the Install DIR from the System Registry.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where do I locate the Install DIR from the System Registry.

    I'm looking for one of two things.... 1.. I need to know where to locate the system registry key that tells me where Daemon Tools is installed too... so I can ethier set it up in the program I am using or option... 2..if possible... create a batch file that grabs the install DIR from system registry.. then launch it...I've created a simple batch file...

    "c:\Program Files\DAEMON Tools\daemon.exe" -mount 0,"image.cue"

    But you have to have the full path listed for it too work.
    I would rather have it grab the needed path from the registry.

  • #2
    Press Start -> Run and type in "regedit", there you can edit the registry, but there are many keys for Daemon Tools,
    you can use these batch commands , example for the "HKLM\HARDWARE\DEVICEMAP\Scsi" registry value:
    REG EXPORT HKLM\HARDWARE\DEVICEMAP\Scsi backup.reg
    REG DELETE HKLM\HARDWARE\DEVICEMAP\Scsi /f >NUL
    REG IMPORT backup.reg >NUL
    Heaven Can Wait -- My Band-Page

    Comment


    • #3
      I just looked thier... but is still doesn't say.... Daemon Tools is located here ...
      c:\Program Files\DAEMON Tools... as an example

      Comment


      • #4
        I don't believe that information is stored in the registry so as to avoid potential sources of blacklisting.

        Comment


        • #5
          ok.... guess I'll just have to assume default Directory... see I was making an autoplay menu where you can click to install Daemon Tools.. then mount a CD Image directy from the Menu... I found that if I just put the daemon.exe tool on the disc... and Daemon Tools was already installed on the system... I could pass the dos command to mount the image then it comes up asking if I want to mount the image... works pretty good actually... but my only concern was if it was compatible with different versions of Deamon Tools being installed on the system.... I think I may just go back to assuming default DIR for it to work.... Does Daemon Tools v4 and v3 series both install to the same default folder?

          Comment


          • #6
            Could anyone at least answer my last question.

            Does Daemon Tools v4 and v3 series both install to the same default folder?

            ie. Daemon Tools v4 uses...

            C:\program files\DAEMON Tools\daemon.exe

            So does v3 use the same folder name/filename as v4?

            Comment


            • #7
              no

              No, it doesn't. This may not be a script you can write after a few seconds of researching. Some versions of DAEMON Tools v3.xx use "D-Tools"
              the modern world:
              net helpmsg 4006

              Comment


              • #8
                I know... I was hoping this would be easier... most programs have a registery entry you can grab to find out where something is installed too. I really don't understand why this program doesn't do the same.... or perhaps have a file on the HD that I could read that tells where the program is installed... like a log file or something...that's always installed to the same spot... oh well...

                Comment


                • #9
                  Well I think I found a suitable solution on my own that I thought I would share with anyone interested. Here is my batch file I created. The Batch file is always executed at the Root of the CD Drive and goes from their.. Basicly checks to see if daemon.exe is in the default folder, if its thier... then mounts the image... if daemon.exe is not found will attempt to search the Hard Drive for Daemon.exe (Which Searches rather quickly on my P3 733Mhz System) If Daemon.exe is found, then mounts image, if not found displays text at the bottom... I hope the formatting looks ok....


                  Code:
                  @ECHO OFF
                  CLS
                  
                  CD Data
                  
                  SET DataFolder=%CD%
                  
                  CD %SystemDrive%\Program Files\Daemon Tools
                  
                  IF NOT exist daemon.exe GOTO Mount1
                  daemon.exe -mount 0,"%DataFolder%\Image.cue"
                  GOTO END
                  
                  :Mount1
                  ECHO.
                  ECHO Daemon.exe Not Found
                  ECHO.
                  ECHO Attempting To Search For Daemon.exe
                  ECHO.
                  CD %SystemDrive%\
                  FOR /F "tokens=2* delims=	 " %%A IN ('dir daemon.exe /s ^| Find "Directory of"') DO SET Daemon=%%B
                  ECHO.
                  ECHO %Daemon%
                  ECHO.
                  CD %Daemon%
                  IF exist daemon.exe "%Daemon%\daemon.exe" -mount 0,"%DataFolder%\Image.cue"
                  
                  :END 
                  CLS
                  ECHO.
                  ECHO Daemon.exe Not Found
                  ECHO.
                  ECHO Attempting To Search For Daemon.exe
                  ECHO.
                  ECHO Was Unable To Locate Daemon.exe
                  ECHO.
                  ECHO You Will Need To Do One Of The Following
                  ECHO To Install This Program.
                  ECHO.
                  ECHO (1) Mount This Image Manually With Daemon
                  ECHO     Tools Or With Any Virtual CD Program
                  ECHO     Of Your Choice.
                  ECHO.
                  ECHO (2) Burn This Image To A CD.
                  ECHO.
                  PAUSE

                  Comment


                  • #10
                    Made one little Error... so reposting Batch file... all works great now...

                    Code:
                    @ECHO OFF
                    CLS
                    
                    CD Data
                    
                    SET DataFolder=%CD%
                    
                    CD %SystemDrive%\Program Files\Daemon Tools
                    
                    IF NOT exist daemon.exe GOTO Mount1
                    START daemon.exe -mount 0,"%DataFolder%\Image.cue" && exit
                    GOTO END
                    
                    :Mount1
                    ECHO.
                    ECHO Daemon.exe Not Found In Default Folder
                    ECHO.
                    ECHO Attempting To Search Hard Drive For Daemon.exe
                    ECHO.
                    CD %SystemDrive%\
                    FOR /F "tokens=2* delims=	 " %%A IN ('dir daemon.exe /s ^| Find "Directory of"') DO SET Daemon=%%B
                    ECHO.
                    CD %Daemon%
                    IF exist daemon.exe GOTO Mount2
                    
                    :Mount2
                    START daemon.exe -mount 0,"%DataFolder%\Image.cue" && exit
                    
                    
                    :END 
                    CLS
                    ECHO.
                    ECHO Daemon.exe Not Found In Default Folder
                    ECHO.
                    ECHO Attempting To Search Hard Drive For Daemon.exe
                    ECHO.
                    ECHO Was Unable To Locate Daemon.exe
                    ECHO.
                    ECHO You Will Need To Do One Of The Following
                    ECHO To Install This Program.
                    ECHO.
                    ECHO (1) Mount This Image Manually With Daemon
                    ECHO     Tools Or With Any Virtual CD Program
                    ECHO     Of Your Choice.
                    ECHO.
                    ECHO (2) Burn This Image To A CD.
                    ECHO.
                    PAUSE
                    Last edited by AmyGrrl; 29.01.2006, 09:36.

                    Comment


                    • #11
                      I thought about addding one extra step... creating a small txt file on the Hard Drive... maybe in the temp folder... that will log the location of Daemon.exe that way next time it can just look for this file and read the location and proceed... if the user ever clears the temp folder... it will simply re-scan the HD for Daemon.exe... if anyone is insterest in that ... I'll post the updated Batch file.

                      Comment


                      • #12
                        That part's simple enough.

                        echo %Daemon% > %Systemdrive%\Daemon.log

                        Command lines and batch files are such fun. Hearkens back to the good old DOS days.
                        Last edited by Jito463; 29.01.2006, 20:54.

                        Comment


                        • #13
                          Ok, here is my final batch file... what I'm using this for is an autoplay menu... so when you put the CD in the drive a menu comes up... one of the menu options is to mount a CD image in Daemon Tools... The problem was that Daemon Tools didn't have a registry entry I could look at that said Daemon Tools is Located here and mount image....

                          So what I did is make a batch file that attempts to mount the image using daemon tools default folder it was installed too, if not found it would search the Hard Drive to see if could it find daemon.exe and mount the image, if it did find it, it would save the location to daemon.exe in file called daemon.txt in your TEMP folder..... if the search didn't find deamon.txt it would display an error.... now the next time you run it will look for the daemon.txt file, check to make sure daemon.exe is in the folder it says its in .. if correct then it will mount the image, if not correct it will re-scan your Hard Drive for daemon.exe...

                          So I hope that explains how it works and I hope other will find it useful.

                          Code:
                          @ECHO OFF
                          CLS
                          CD Data
                          SET DataFolder=%CD%
                          
                          set DT=%SystemDrive%\Program Files\Daemon Tools\daemon.exe
                          
                          if exist "%temp%.\daemon.txt" (
                          for /f "delims=" %%A in (%temp%.\daemon.txt) do set DT=%%A
                          )
                          
                          IF NOT exist "%DT%" goto next
                          START "" "%DT%" -mount 0,"%DataFolder%\image.cue"
                          GOTO :EOF
                          
                          :next
                          if exist "%temp%.\daemon.txt" del "%temp%.\daemon.txt"
                          CLS
                          ECHO.
                          ECHO Daemon.exe Not Found In Default Folder
                          ECHO.
                          ECHO Attempting To Search Hard Drive For Daemon.exe
                          ECHO.
                          SET Daemon=
                          FOR /F "delims=" %%A IN (
                          'dir %SystemDrive%\daemon.exe /s /b'
                          ) DO SET Daemon=%%A
                          if "%Daemon%"=="" goto :END
                          
                          echo %Daemon%>"%temp%.\daemon.txt"
                          
                          START "" "%Daemon%" -mount 0,"%DataFolder%\image.cue"
                          GOTO :EOF
                          
                          :END
                          CLS
                          ECHO.
                          ECHO Was Unable To Locate Daemon.exe
                          ECHO.
                          ECHO You Will Need To Do One Of The Following
                          ECHO To Install This Program.
                          ECHO.
                          ECHO (1) Mount This Image Manually With Daemon
                          ECHO     Tools Or With Any Virtual CD Program
                          ECHO     Of Your Choice.
                          ECHO.
                          ECHO (2) Burn This Image To A CD.
                          ECHO.
                          PAUSE
                          @exit
                          Last edited by AmyGrrl; 01.02.2006, 16:26.

                          Comment

                          Working...
                          X