Want to know path of .exe file
-
i want to know the path where this .exe located. ofcourse most of user set path c:/program file and the software's folder. but if it is else where then what ? so i want to know location of exe and then start that exe using Process.strat. Thanks Prakash Paghdal (prakash_paghdal@hotmail.com)
-
i want to know the path where this .exe located. ofcourse most of user set path c:/program file and the software's folder. but if it is else where then what ? so i want to know location of exe and then start that exe using Process.strat. Thanks Prakash Paghdal (prakash_paghdal@hotmail.com)
Hi Prakash, If I got it right ,then you are probably talking about the path set by the user for installing a software in this case your .exe.you will get the location of all the assemblies being installed by the program under the HKLM\SOFTWARE\Classes\Installer\Assemblies registry key.Iterate through all the keys and check whether the name of any subkey ends with "app.exe" where app.exe is the name of your .exe file.The seperator used in the name will be "|" .so don't forget to replace it with "\".Hope it Helps. Rakesh
-
i want to know the path where this .exe located. ofcourse most of user set path c:/program file and the software's folder. but if it is else where then what ? so i want to know location of exe and then start that exe using Process.strat. Thanks Prakash Paghdal (prakash_paghdal@hotmail.com)
-
i want to know the path where this .exe located. ofcourse most of user set path c:/program file and the software's folder. but if it is else where then what ? so i want to know location of exe and then start that exe using Process.strat. Thanks Prakash Paghdal (prakash_paghdal@hotmail.com)
You can also use System.Reflection.Assembly.GetExecutingAssembly().Location or GetName().CodeBase