![]() Private void AddShellCommandDefault(List lst, RegistryKey shell, string reg KeyOpenRead) "C:\Program Files (x86)\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe" "%1"įrom where you can strip %1 and get adobe app path. HKEY_CLASSES_ROOT\Applications\XXXX\shell\Read\command.HKEY_CLASSES_ROOT\Applications\XXXX\shell\Open\command.Use them to combine and read keys (either Open or Read should be present) Any suggestions for a better approach.Īdobe file associations are kept in registry - you can read them under Every time Adobe releases a new version i have to make sure i have to handle it differently. String acroReadVersions = acroRead.GetSubKeyNames() Ĭonsole.WriteLine("The following version(s) of Acrobat Reader are installed: ") įoreach (string versionNumber in acroReadVersions)īut some im not satisfied with this approach. RegistryKey acroRead = adobe.OpenSubKey("Acrobat Reader") RegistryKey adobe = ("Software").OpenSubKey("Adobe") However, the issue i face now is that, the registry key location keeps changing in almost every new version of Adobe Acrobat Reader.Īll I can think of now is to have a switch case to handle for all the different Adobe versions in my code. ![]() NET)Īnd then take a decision based on the value. Though this seems straightforward like I need to query the key using Registry class (for. My requirement is to read a particular registry key related to Adobe acrobat reader and take a decision based on the value of that key.
0 Comments
Leave a Reply. |