if i click *.doc the microsoft word open automatically.
i have a code who work good but i need the program to know the file path thet belonging to the file who opend the program.
i need an example thet insert the path file to a lable object or a variable.
function CreateFileAssociation(strApplicationPath, strFileExtension, strAppShortName, strIconFile)
Registry.SetValue(HKEY_CLASSES_ROOT, strFileExtension, "", strAppShortName);
local strCommandLine = "\""..strApplicationPath.."\" \"%1\"";
Registry.SetValue(HKEY_CLASSES_ROOT, strAppShortName.."\\shell\\open\\command", "", strCommandLine);
if(File.DoesExist(strIconFile))then
local strApp83path = File.GetShortName(strIconFile);
Registry.SetValue(HKEY_CLASSES_ROOT, strAppShortName.."\\DefaultIcon", "", strApp83path..",0");
end
end
local strApplication = "d:\\LND.exe"
CreateFileAssociation(strApplication, ".rrr", "e:\\LND.exe", "e:\\1.ico",0) ;

Reply With Quote