本帖最后由 maglic1 于 2009-07-15 22:00:44 编辑

解决方案 »

  1.   

    AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
      

  2.   

    查询注册表获取程序名称和路径
    当前程序用Application.StartPath
    web里 AppDomain.CurrentDomain.BaseDirectory
      

  3.   

    查找HKEY_CURRENT_USER\Software\Microsoft\Installer\Products和HKEY_LOCAL_MACHINE\Software\Classes\Installer\Products
    Windows Installer安装的程序可以用MsiEnumProducts和MsiEnumComponents查询更多的信息。
      

  4.   

    能否贴图出来看看,怎么我查找不到 - -!!!...
    还有,在注册表里我找不到  "MsiEnumProducts和MsiEnumComponents查询更多的信息。"这两个...
      

  5.   

    C#获取当前应用程序所在的路径- -
        
    System.Environment.CurrentDirectory;
    //例: c:\test
    Application.ExecutablePath;(包括名称)
    //例: c:\test\myapp.exe
    Application.StartupPath;(不包括名称)
    //例: c:\test
      

  6.   

    我给大家再说一下把:: 就是我知道在注册表下 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 例如 
    获得::某软件 DisplayName 为  WinRAR 压缩文件管理器 
    那么是如何找到::  WinRAR 压缩文件管理器  ->对应的  .exe文件?也就是如何查到到  WinRAR.exe 
    这个运行文件的名称 
      

  7.   

    没有这样的API。
    一个软件中可以有多个exe。