PDA

View Full Version : Mount from my app



Biocide
18.05.2006, 17:54
I have made an app that have a lot of image files stored within.
When I try to mount an image from the app i get an invalid image file error.
The mount script:

File.Run("c:\\Program Files\\D-Tools\\daemon.exe", "-mount 0, \"AutoPlay\\LAN\\R6 RogueSpear\\Rainbowsixroguespear.cue\"", "c:\\Program Files\\D-Tools", SW_MINIMIZE, false)

But if i copy the image file to an the harddrive like this its no problem:

File.Move(_SourceFolder.."\\AutoPlay\\LAN\\Ghostrecon\\GRECON.mds", "c:\\Program Files\\D-Tools\\GRECON.mds", true, true, false, false, nil);
Application.Sleep(1000);
File.Move(_SourceFolder.."\\AutoPlay\\LAN\\Ghostrecon\\GRECON.mdf", "c:\\Program Files\\D-Tools\\GRECON.mds", true, true, false, false, nil);
Application.Sleep(1000);
File.Run("c:\\Program Files\\D-Tools\\daemon.exe", "-mount 0, \"c:\\Program Files\\D-Tools\\GRECON.mds\"", "c:\\Program Files\\D-Tools", SW_MINIMIZE, false)

This is not a good way to do it so if anyone can help me get ride of that error or help me with a better solution to mount the image please let me know.

Please help me!

Underheaven
19.05.2006, 04:12
In the first example you try to mount a .cue file, in the second example you try to mount a .MDS file. I thought all that was supposed to change was the drive letter and path?

What kind of folder is _SourceFolder? Read only? CD/DVD? Network drive?

Biocide
19.05.2006, 07:33
the image file is changing in this example because i copied the code from my project, and as i said in i have many image files in my application (6-10) you can se the first example its from Rainbow Six and the second is Ghost Recon.
SourceFolder is the root of the application and will be where the app is installed.
The app is an exe file (Installer)
When the user installs the app he chooses where to install it.
from the install dir it creates an file structure that is set from the beginning in the app.
That way i always can point code to the right file.
It looks like its a problem for daemon to understand the command _sourceFolder.
Is that the problem??

AmphetaMarinE
20.05.2006, 03:46
Your app should be the only thing that needs to understand your variables...
As soon as it sees _SourceFolder, it should, AFAIK, parse that to an actual path, and pass that on to d-tools...
Also after looking again at ur code.. you don't even have a _SourceFolder variable in the one which won't work for you...
Possibly thats your problem?
Try changing:

File.Run("c:\\Program Files\\D-Tools\\daemon.exe", "-mount 0, \"AutoPlay\\LAN\\R6 RogueSpear\\Rainbowsixroguespear.cue\"", "c:\\Program Files\\D-Tools", SW_MINIMIZE, false)
To:

File.Run("c:\\Program Files\\D-Tools\\daemon.exe", "-mount 0, _SourceFolder.."\\AutoPlay\\LAN\\R6 RogueSpear\\Rainbowsixroguespear.cue\"", "c:\\Program Files\\D-Tools", SW_MINIMIZE, false)

AmphetaMarinE
30.05.2006, 08:25
Any update on the progress?
I'm dying to know if you got this going....