Open files
-
Hi everybody. I need to open some files from my app. So I used do parse the register in order to obtain the default program and run it. For example, to open a pdf file I parsed the HKEY_CLASSES_ROOT for the ".pdf" key and got AcroExch.Document as value. Then I parsed again HKEY_CLASSES_ROOT for the "AcroExch.Document\shell\comman\open\" key and got the whole path of Acrobat Reader. Finally I opened the file using spawnl command. With Acrobat it's almost all OK, but I neede to open html files too. And Internet Explorer doesn't work as Acrobat does, besides I got the right value of Ecplorer's path. Any suggestion? Is there any other way to open a file using its default program? Thanks,
-
Hi everybody. I need to open some files from my app. So I used do parse the register in order to obtain the default program and run it. For example, to open a pdf file I parsed the HKEY_CLASSES_ROOT for the ".pdf" key and got AcroExch.Document as value. Then I parsed again HKEY_CLASSES_ROOT for the "AcroExch.Document\shell\comman\open\" key and got the whole path of Acrobat Reader. Finally I opened the file using spawnl command. With Acrobat it's almost all OK, but I neede to open html files too. And Internet Explorer doesn't work as Acrobat does, besides I got the right value of Ecplorer's path. Any suggestion? Is there any other way to open a file using its default program? Thanks,