Page 1 of 1
SSF Auto-mount script not working [DTLite + Win10]
Posted: Mon Jul 18, 2016 10:44 pm
by reaperke
Hi,
I had high hopes mgalaxy 6 would have tackled the auto mount issue I keep having with DTLite no being found but no luck.
The problem lies in the fact that my DTLite under Win10 seems to have no entries in the windows registry as opposed to what the autolt script expects so I always get the error "DTLite not found.Please install it!".
DTLite is installed yet nowhere in the registry and I have been uninstalling/reinstalling more than enough.
I've tried to change the script myself based on info with similar issues but I'm no coder and nothing I try seems to change anything.
Can someone please help me out with this? Much appreciated.
Gr.
Koen
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Tue Jul 19, 2016 1:30 pm
by Aeliss
Ha yes, it's normal, I forget that.
On last deamon tool version (or only for win10) the executable isn't called "dtlite.exe" but "DTAgent.exe".
Try to edit the file "mGalaxy\Data\Scripts\SSF [Script + DTlite].au3" with this modification, you can edit it with notepad.
Or if it doesn't work, ca you take a look in the registry to find the correct key ?
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Wed Jul 20, 2016 9:39 pm
by reaperke
As far as knowing what I'm doing I can only find two entries in the registry referring to DTAgent.exe, neither seems to solve the problem when changing the key in the script.
I can't imagine that I'm the only one having this issue, any more thoughts?
Why does this use the registry key to begin with? Launchbox runs this proces very well using additional apps feature with a bat file, seems like this could be a similar approach to the new pre-launch feature for mgalaxy6
This issue is the only open keeping me from going to a premium version as I like mGalaxy quite a lot so it's a shame tha emulating one of ma favorite consoles is causing some grief
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Thu Jul 21, 2016 6:48 am
by mgalaxy
reaperke,
Why does this use the registry key to begin with?
It uses a registry key to be "universal" and not require the user to hard code the path to the application!
I will fix this DTlite + Win10 problem while I'll be back from holiday!
In the meanwhile, I would suggest you to simply enter the path to your application in the script!
Simply copy/paste this code to replace the one you can find in "mGalaxy\Data\Scripts\SSF [Script + DTlite].au3"
You will of course edit the line: Local $pathdaemon = "Type here the path to DTlite.exe" with the real path to your DTlite.exe executable
Code: Select all
Local $count = StringInStr($CmdLineRaw, '.au3"', 0 , 1, 1)
Local $commandline = StringTrimLeft( $CmdLineRaw, $count + 5 )
Local $count2 = StringInStr($commandline, '.exe', 0 , 1, 1)
local $app = StringLeft ($commandline, $count2 + 3 )
local $command = StringTrimLeft($commandline, $count2 + 4 )
if not $command then exit 0
Local $workingDir = StringRegExpReplace($app, "\\[^\\]*$", "")
FileChangeDir($workingDir)
;---------------------------------------------------------------------------
Local $pathdaemon = "Type here the path to DTlite.exe"
RunWait('"' & $pathdaemon & '" -mount 0,' & $command )
RunWait('"' & $app & '"')
RunWait('"' & $pathdaemon & '" -unmount 0')
Exit 0
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Thu Jul 21, 2016 9:55 am
by reaperke
Wow thanks for the update, the intermediate solutions doesn't do much though it just opens DTlite where I can than manually mount an image, closing it down launches SSF with the game, so workable for a while at least
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Thu Jul 21, 2016 10:04 am
by mgalaxy
Many users revert to DTLite v5.0...the script I've joined here is working with that v5
I think (that must be verified) that you should use this command line if you're using DTLite v10:
Code: Select all
RunWait($pathdaemon & ' -mount dt,0,' & $command )
So, the script would be:
Code: Select all
Local $count = StringInStr($CmdLineRaw, '.au3"', 0 , 1, 1)
Local $commandline = StringTrimLeft( $CmdLineRaw, $count + 5 )
Local $count2 = StringInStr($commandline, '.exe', 0 , 1, 1)
local $app = StringLeft ($commandline, $count2 + 3 )
local $command = StringTrimLeft($commandline, $count2 + 4 )
if not $command then exit 0
Local $workingDir = StringRegExpReplace($app, "\\[^\\]*$", "")
FileChangeDir($workingDir)
;---------------------------------------------------------------------------
Local $pathdaemon = "C:\Program Files\DAEMON Tools Lite\DTAgent.exe"
RunWait($pathdaemon & ' -mount dt,0,' & $command )
RunWait('"' & $app & '"')
RunWait('"' & $pathdaemon & '" -unmount,0')
Exit 0
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Tue Jul 26, 2016 4:30 pm
by mgalaxy
reaperke,
Is your problem resolved? May we still help you?
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Sun Jul 31, 2016 9:17 am
by reaperke
Hi,
We're certainly heading in the right direction here.
It now auto mounts and launches well in SSF however when quitting DT says "unknown switch in command line"
The help in this is greatly appreciated, nice to know a platform like this is well supported.
Kind regards
Koen
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Sun Jul 31, 2016 10:24 am
by mgalaxy
Hi Koen,
Here is a working script, tested! :-)
Just type the path to DTagent.exe in line 13 (ex.: Local $pathdaemon = "C:\Program Files\DAEMON Tools Lite\DTAgent.exe")
Code: Select all
Local $count = StringInStr($CmdLineRaw, '.au3"', 0 , 1, 1)
Local $commandline = StringTrimLeft( $CmdLineRaw, $count + 5 )
Local $count2 = StringInStr($commandline, '.exe', 0 , 1, 1)
local $app = StringLeft ($commandline, $count2 + 3 )
local $command = StringTrimLeft($commandline, $count2 + 4 )
if not $command then exit 0
Local $workingDir = StringRegExpReplace($app, "\\[^\\]*$", "")
FileChangeDir($workingDir)
;---------------------------------------------------------------------------
Local $pathdaemon = "Type here the path to DTagent.exe"
RunWait($pathdaemon & ' -mount dt,0,' & $command )
RunWait('"' & $app & '"')
RunWait($pathdaemon & ' -unmount dt,0')
Exit 0
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Sun Jul 31, 2016 1:34 pm
by mgalaxy
To conclude, here is the final script (available with next mGalaxy version).
With this script, no need to specify your local path to Daemon Tools v10, mGalaxy will find it by itself!
Code: Select all
;----------========== Parsing (common to every scripts) ==========----------
;
; There has been a call from mGalaxy to AutoIt and a commandline has been passed to it:
; Structure:/AutoIt3ExecuteScript "Path_to_script(between quotes)" Path_to_emu Emu_parameters(including a "Path_to_rom"(between quotes))
; Example:/AutoIt3ExecuteScript "C:\...\MESS [Script].au3" C:\...\mess64.exe a800 -flop1 "C:\...\Boulder_Dash.zip" -skip_gameinfo -nowindow
;
; 1. We don't need the part related to AutoiIt anymore [/AutoIt3ExecuteScript "Path to script (between quotes)"], the rest is assigned to '$commandline'
; 2. '$commandline' is then split in two: [Path_to_emu] goes to '$app', [parameters(including a "Path to rom" (between quotes))] goes to '$command'
; 3. Some apps (MESS for instance, when it searchs for a system Bios) need to know the path to their 'Working Directory'. We do 'extract' it from the full app path
;
; 1
Local $count = StringInStr($CmdLineRaw, '.au3"', 0 , 1, 1)
Local $commandline = StringTrimLeft( $CmdLineRaw, $count + 5 )
; 2
Local $count2 = StringInStr($commandline, '.exe', 0 , 1, 1)
local $app = StringLeft ($commandline, $count2 + 3 )
local $command = StringTrimLeft($commandline, $count2 + 4 )
if not $command then exit 0
; 3
Local $workingDir = StringRegExpReplace($app, "\\[^\\]*$", "")
FileChangeDir($workingDir)
;---------------------------------------------------------------------------
;Get path to DTAgent.exe
Local $pathdaemon = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "DAEMON Tools Lite Automount")
If not $pathdaemon Then
MsgBox(4096, "Search error", "DAEMON Tools Lite not found. Please install it!")
exit 0
Endif
$pathdaemon = StringTrimRight ( $pathdaemon, 9 )
RunWait($pathdaemon & ' -mount dt,0,' & $command )
RunWait('"' & $app & '"')
RunWait($pathdaemon & ' -unmount dt,0')
Exit 0
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Sun Jul 31, 2016 8:07 pm
by reaperke
This final scripts is great, thx for the effort, on with premium :-)
Re: SSF Auto-mount script not working [DTLite + Win10]
Posted: Sun Jul 31, 2016 10:11 pm
by mgalaxy
[quote="reaperke"]
This final scripts is great, thx for the effort, on with premium :-)
[/quote]
Glad to help you!
Thanks for your support!