I want when you click on a custom file to open with my program in windows. Will I I have to manually edit the registry ?
I’ve been wondering something vaguely similar. I sometimes make script files and compile them to Neko, and I want to be able to drag and drop files onto the .n
files.
Currently I have to make a batch file that passes any command-line arguments through to the script file. (It works, but it’s inconvenient.)
As for your problem, have you tried right-clicking, choosing “open with,” and choosing a new default program?
Yes. Thats works but I would like to send the program to a colleague, this feature is not required but would add a professional feel but if it can’t be done automatically then it’s alright.
That’s usually handled by the program installer. Unfortunately, I don’t know how to make one.
Thanks anyway I’ll look into a program installer
What extension do you want to handle, for what purpose?
Depending on what you want to do, there might be another way to approach it
The extension is a custom binary data one. (".tmap") it just contains tile data. I can read the file but I was hoping for a way to make my program the default one. There are no other program associations to it. I have to (on windows) go to open with instead I would like it to auto associate the program with the file extension.
Ah, gotcha, so you’re doing an editor. That’s neat. Keep going
you can use Sys.command() to use command prompt
(there a ProcessHelper in Lime,too
this is how to use regedit.exe
you can create a .reg file
(or you can create a text file and save as .reg in runtime
and use command prompt to add regstry in game
this is how to create a file association registry
http://msdn.microsoft.com/en-us/library/cc144158(VS.85).aspx
hope this help you
Thanks this information should help. Ok so I do need to use the registry, I was mostly wondering how to access it through haxe but this might be the solution.
I found a library called “systools” (it’s in haxelib, too)
it let you modify registry directly
better than messing around with regedit?
This should be better that using regedit. Thanks