erik_demon Posted May 15, 2005 Share Posted May 15, 2005 (edited) Hey guys In have a question about autoIT.I want to mount an image with Daemon Tools. This on itself isn't a problem.Run ("C:\Program Files\D-Tools\daemon.exe -mount 0,D:\Install\battlefield\BFV_1.iso")The line above works. The only problem here is that I use an absolute file path.I want all file patchs ("C:\Program Files\D-Tools\daemon.exe & D:\Install\battlefield\BFV_1.iso) to be relative.With the program file patch this is easy:Run (@ProgramFilesDir & "\D-Tools\daemon.exe -mount 0,D:\Install\battlefield\BFV_1.iso")Now I want to get rid of D:\ . For this I want to use @ScriptDirHow do I put this inside the line?Edit:I tried it like this: but the Daemon tools tells me that the image can't be mounted Run (@ProgramFilesDir & "\D-Tools\daemon.exe -mount 0,@ScriptDir\BFV_1.iso") Edited May 15, 2005 by erik_demon Link to comment Share on other sites More sharing options...
Nologic Posted May 15, 2005 Share Posted May 15, 2005 Run (@ProgramFilesDir & "\D-Tools\daemon.exe -mount 0," & @ScriptDir & "\BFV_1.iso") Link to comment Share on other sites More sharing options...
erik_demon Posted May 15, 2005 Author Share Posted May 15, 2005 Thanks for the fast reply This works like a charm Could you tell me a little more about when to use the &? I am confused now Thanks again Link to comment Share on other sites More sharing options...
Nologic Posted May 15, 2005 Share Posted May 15, 2005 it basically just adds to some thing prior...in the above case it adds a macro to a text string, then adds another text string to that.Heh its the same as the start where you have:Run (@ProgramFilesDir & "\D-Tools\...which joins what ever the pathing info is contained in @ProgramFilesDir to "\D-Tools\..., so its just splicing in info...its the same thing you have been doing...just placed some where else is all. Okay more of an example"\D-Tools\"is the same as"\" & "D" & "-" & "T" & "o" & "o" & "l" & "s" & "\"More examples Okay we know that @ScriptDir macro contains the pathing information of where the active script is located, in your example "D:\Install\battlefield".Now lets say we need the 8.3 file name conversion...short name in other words. Well we also know that by using the fuction "FileGetShortName" that it will return the 8.3 naming information that we need, example:$a = FileGetShortName("C:\Program Files");$a is probably "C:\PROGRA~1"But in our case it would need to be:$a = FileGetShortName(@ScriptDir);$a is probably "D:\Install\battlefield"So if we needed 8.3 file naming in it, then the line would look some thing like so:Run (@ProgramFilesDir & "\D-Tools\daemon.exe -mount 0," & FileGetShortName(@ScriptDir) & "\BFV_1.iso") Link to comment Share on other sites More sharing options...
erik_demon Posted May 15, 2005 Author Share Posted May 15, 2005 Okay, it's clear now, thnx Link to comment Share on other sites More sharing options...
Nologic Posted May 15, 2005 Share Posted May 15, 2005 hehe good deal & your welcome Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now