flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > Creating a Simple Scripting Language. |
Author |
|
revolution 23 Dec 2009, 00:04
Just pass the whole path to cmd.
Code: cmd c:\myStuff\CommandLineThingies\Batchypoos\GreatShit\SolveAllTheWorldsProblems.bat |
|||
23 Dec 2009, 00:04 |
|
Tyler 23 Dec 2009, 00:19
No, I mean what does Windows send to a program(cmd in the example). I need to know how cmd receives the path(when a .bat is clicked and Windows opens cmd because cmd is associated with .bats). I am looking into how hard it would be to make a program that would be in the role of cmd in the example. I want it to be able to run scripts, as well as typed commands.
|
|||
23 Dec 2009, 00:19 |
|
bitRAKE 23 Dec 2009, 01:11
Windows passes the commandline to the program defined in the registry. Then the application uses the GetCommandline (or others) API.
|
|||
23 Dec 2009, 01:11 |
|
revolution 23 Dec 2009, 01:21
Tyler wrote: No, I mean what does Windows send to a program(cmd in the example). I need to know how cmd receives the path(when a .bat is clicked and Windows opens cmd because cmd is associated with .bats). I am looking into how hard it would be to make a program that would be in the role of cmd in the example. I want it to be able to run scripts, as well as typed commands. |
|||
23 Dec 2009, 01:21 |
|
Tyler 23 Dec 2009, 04:25
Thanks, I should have got it from revolution's first reply, but wasn't sure how Windows passes arguments when the args are generated by GUI. Anyway, the path to the file is in argv[1].
|
|||
23 Dec 2009, 04:25 |
|
roboman 23 Dec 2009, 04:26
If you right click on a desktop icon or file and then go down and click on properties you will see what info windows has on where the file is. The rest, as pointed out above is in the registery. I may be wrong, but I think you can also define paths, just like in dos, if it's Win 95, 98 or ME.
|
|||
23 Dec 2009, 04:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.