Original Post
Hello,
A pretty raggedy question, I couldn't really find exact answers to...
So, I want to make a file extension for a file type I'm using with my program, and I want that after the extension is set, and the file with that extension is double clicked, I want it to feed the file's path as a startup command argument in the program, so, how do I do it?
Currently, I have this:
So... any good programmatic way?
Thanks!
A pretty raggedy question, I couldn't really find exact answers to...
So, I want to make a file extension for a file type I'm using with my program, and I want that after the extension is set, and the file with that extension is double clicked, I want it to feed the file's path as a startup command argument in the program, so, how do I do it?
Currently, I have this:
exeFolder = Environment::CurrentDirectory;
String^ keyName = "HKEY_CURRENT_USER\\Software\\Classes";
String^ subKey = \\SilverBridge.Phantasya;
//Registring the file extension if not already registered
String^ reg = Convert::ToString(Registry::GetValue(keyName+subKey+\\shell\\open\\command, "", "-1"));
if(reg == ""){
Registry::SetValue(keyName+subKey+"\\shell\\open\\command", "", exeFolder+"\\CLRTest.exe");
Registry::SetValue(keyName+"\\.gpj", "", subKey);
Registry::SetValue(keyName+subKey+"\\DefaultIcon", "", exeFolder+"\\CLRTest.exe");
}
So... any good programmatic way?
Thanks!