Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从我的引导程序中访问我的 Setup.exe 的路径。但是 usingAssembly.GetExecutingAssembly().Location总是返回可执行文件似乎被解包的临时路径。当我的 Setup.exe 从那里启动时,我怎样才能得到“c:\downloads”?
Assembly.GetExecutingAssembly().Location
Application.StartupPath;
这为您提供了启动程序的 exe 的路径:
MSDN