|
Hi.
I want to find out the path to the AcrobatReader executable file in case it is installed on the local computer.
For this I must search the registry.
What key should I look for?
I saw with regedit.exe that \HKEY_CLASSES_ROOT\acrobat\DefaultIcon has the exact value I need(path to acrord32.exe). But is this right?
object obj = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("acrobat").OpenSubKey("DefaultIcon").GetValue(""); <br />
return obj.ToString();
The above code works, but I don't know that this is the proper way to do it.
What other keys would be indicated?
Note: I must not rely on the fact that AcrobatReader is the default program associated with pdf files, so searching for the default program associated with pdf is rulled out.
Thank you.
|
|
|
|
|
hi
if you look for [HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader] and it does not return a null value then you have the software installed. then you can open sub-keys to check the version and the location of the exe file.
hope this helps
regards
|
|
|
|
|
Thanks.
But this approach has some issues:
* Nowhere in it's subkeys have I found a reference to the actual exe file, just to the install folder. Have you?
* More importantly, I see that the subkey structure depends on the version of AcrobatReader installed on the machine
Anyway, if I don't find anything better I'll go for a combination of the two solutions.
|
|
|
|
|
hi again
i did found the location from the key - 'InstallPath' and the executable file from the key - 'Language\next'
as for the subkey structure, it depends on the version, but a little research will solve that as well.
i have versions 8 and 5 in my machine and their subkeys are:
v8 - HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\
v5 - HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe Acrobat\
hope this helps
regards
|
|
|
|
|
Thanks again.
Could you please share the full name of the InstallPath key for your versions?
I have version 7 and mine is:
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\7.0\InstallPath
|
|
|
|
|
hi,
the full paths are:
[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe Acrobat\5.0\InstallPath]
[HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\8.0\InstallPath]
regards
|
|
|
|
|
I appreciate.
I have version 6 installed on my home computer, so 4 down, 4 for to go.
|
|
|
|
|
well good luck with that.
regards
|
|
|
|
|
I need the C# codes which can convert html to word in .net.
could you plz help me?
Besides, I have looked through http://www.codeproject.com/aspnet/wordapplication.asp
A topic named "Microsoft Word Documents from ASP.NET", this is great !
but , I want to convert html to word in my project instead of write a new document.
thanks in advance.
|
|
|
|
|
1. Create a new blank MS Word document.
2. Stream read it with your C# app.
3. Save the data you get from your stream to be used later as the header of your newly created word docs.
4. Create a new file with the .doc extension.
5. Start writing the header you kept earlier from step 2.
6. Append what ever you want here.
ps. You may have data before and after your data, to check that, go through 1-3, and then open your word document and add any testing text, save it and compare it's data with the previous one to see where's the differences, MS DOS FC is a good tool to do that, fire it from your C# app and store it's outputs.
Cheers.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Word has never had a problem reading HTML :p
|
|
|
|
|
thanks
|
|
|
|
|
hello all,
i have created an application using visual C#.
can any1 tell me as to how i can convert this application into a *.exe format so that it can be used by any1 who doesnt hac C# installed on his system.
thanks in advance.
|
|
|
|
|
Just press F6, and if you dont have any compilation errors, you should find it in your solution's debug/bin folder.
unfortunatly, for people to run your app, the need to have the .Net redistributable run-time environment
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
thanks for the suggestion...
so how do i give my program to some1 who dose not have C# installed in his system??is .net redistributable run-time environment the only option??if yes, then can u plz tell me how it works??
|
|
|
|
|
I'm not sure about Vista although I would think they already have at least the .Net Framework ver 2.0 already packed. For XP. SP2 is usually equipped with .Net Framework 1.1, but to run later versions of .Net apps, you need to have the equivalant run-time environment.
I usually ask my clients to download this, and I suppose you do the same. It should run fine then.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
well, one of the first things you learn about programing is that you COMPILE things.. things like code.. or resources.. yes.. you COMPILE them..
so tell me.. how did you learn c# without COMPILING any code?!..
life is study!!!
|
|
|
|
|
|
You should go out and buy a book on C#. This is the first of many basic things you'll find yourself getting lost on if you try to rely solely on online forums to learn a language.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
enter to the project properties by clicking right click on the project at the "Solution Explorer" in visual studio 2005 and then enter to publish and click the "Publish Now" or "Publish Wizard..." command!
|
|
|
|
|
Hi guys
actualyy i am very much new to dot net
i am using fram work 1.1 . i want to read from web.config gile in my application
but i am not getting that can any body tell me the exzact syntax,,
my web.config is as follows
<configuration>
<appsettings>my text here<\appsettings>
<connectionstring> my connection string here<\connectionstring>
thanks in advance
hello Hi g
|
|
|
|
|
In web. config:
<connectionStrings><br />
<add name="ConnectionName" connectionString="blah blah blah"/><br />
</connectionStrings>
In the app:
<br />
ConfigurationManager.ConnectionStrings["ConnectionName"].ConnectionString;<br />
I'm using MySQL for adb at the moment so i removed the connection string stuff
HTH
Russ
|
|
|
|
|
ConfigurationManager.ConnectionStrings will only help in reading the text in ConnectionStrings section.
To read in appsettings use ConfigurationSettings.AppSettings.Get("Name")
Hope this helps
|
|
|
|
|
Wouldn't this work for you?
string cs = Form1.Properties.Settings.Default["connectionstring"];
Where you replace Form1 with the namespace of your application.
|
|
|
|