问题描述
我目前正在使用带有 4.6.1 .net 框架的 Visual Studio 2017.我为我的桌面应用程序创建了安装文件,安装程序在我的系统中完美安装和运行.问题是安装程序在其他计算机上成功安装,但应用程序没有打开.
编辑
在客户端系统中下载了 .net 框架,但仍然出现同样的问题.
编辑 2
我使用 Dependency walker 运行了依赖扫描.它说有一堆文件系统找不到 - 打开文件时出错.系统找不到指定的文件.
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLLAPI-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLLAPI-MS-WIN-CORE-WINRT-L1-1-0.DLLAPI-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLLAPI-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLLAPI-MS-WIN-SHCORE-SCALING-L1-1-1.DLLDCOMP.DLLIESHIMS.DLL
此外,发现 x86 类型的模块出现错误 - 包括 setup.exe - 但我不知道这是怎么发生的.无论我在哪里看到列出的选项,我都选择了 64.请找到 截图.如果这确实是问题,我该如何解决?
应用程序启动问题:这是一个简短的版本:WPF 应用程序在我启动时崩溃.Chattier 版本.Martin Prikryl 的一个不错的:与 Inno 一起安装时应用程序不起作用设置
日志:始终检查所有事件日志、应用程序日志和MSI日志 - 如果有的话.顺便提一下.也许尝试附加调试器此处描述的测试 - 只要应用程序完全启动.然后单步执行代码.
通常的罪魁祸首:您可能只是
缺少运行时
(示例),有位问题
(32/64位)或权限/权限不足
,或配置错误
(ini
、xml
、注册表
、等...
).总结 - 鱼雷,在下面完全展开 - 没有什么太愚蠢的更不用说:-):
<块引用>缺少运行时:首先,始终检查缺少的运行时.例如:
.Net
、.Net Core
、Java
、Silverlight
、Direct X
(现在甚至用于应用程序)、VC++ Runtime
、MS-XML
(旧版)、等...
.请记住,它们有不同的版本,有些不能在盒子上共存,而有些则不能共存可以并排运行.
<块引用>错误代码:查找错误代码和异常消息.
- "幻数数据库" - 在线查找.
- 检查错误代码 - 多种工具和方法.
<块引用>调试工具:调试工具的一些信息.
<块引用>
- 调试依赖问题的工具 -
ProcMon.exe
、VS
、Dependency Walker
、etc...
- COM 依赖错误
- 必备的服务调试工具:
事件查看器
、任务管理器
、Services.msc
- <代码>进程资源管理器,
NET 命令
,SC.exe
- Windows 服务常见问题解答 (FAQ)
<块引用>ProcMon.exe:交易工具.一刀切工具.蜜蜂的膝盖,最高的,量子飞跃,猫的睡衣(是的,这是 Top Gear Hamster 的典故).有效地使用它可能是一个挑战,但它是最好的免费通用调试工具.
- 快速, 基本样本
- Hanselman 的较长视频示例
其他想法:
- 配置设置?
- Dev-box sins:硬编码引用?测试服务器/UAT 链接?
- 清单、INI文件和XML文件?
- 注册表设置?港大/港中大
- 连接字符串.参见身份验证和下面还有授权部分.
- 平台与比特度?(ARM、英特尔 32/64 等...).
- 从错误的注册表配置单元中读取非常常见( 经典浪费时间):
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMyAppMySettings
(32 位)HKEY_LOCAL_MACHINESOFTWAREMyAppMySettings
(64 位)
- 从错误的注册表配置单元中读取非常常见( 经典浪费时间):
- 先决条件 &依赖项?
- 关于依赖扫描和调试的话题.
- Dependency Walker:依赖类型.
- Fuslogvw.exe告诉你什么?(.NET 应用程序的 .NET 程序集绑定失败).运行时如何定位程序集
- 快速检查:Visual Studio 模块视图
- 注册缺失/损坏(间接依赖)
- 缺少 COM、COM 互操作 (regasm.exe)、无注册 COM(基于清单)
- 从 COM 组件调用 .NET 组件李>
- 从 .NET 客户端调用 COM 组件
- Broken Side-By-Side Win32 Assembly Manifest(晦涩难懂,可能是由于马虎的企业应用程序重新打包造成的,可能会攻击看似随机的 PC)
- GAC 安装?
- 存在两个 GAC.
- GAC/WinSxS 提交问题:GAC/WinSXS 文件直到提交阶段才会安装到 GAC 中在 StartServices 之后.
- 缺少 COM、COM 互操作 (regasm.exe)、无注册 COM(基于清单)
- 权限和特权?- 本地 - ACL 权限 和 NT 权限一个>?
- ProcMon.exe
- 解决权限被拒绝:
- System.UnauthorizedAccessException 在程序下运行 .exe 时文件
- WiX安装后我的exe文件双击无法运行,只能以管理员身份运行
- 身份验证/授权 - 网络相关
- 本地用户、域用户、Active Directory:组成员、组策略等...
- 启动用户:用户个人资料问题?也许尝试在失败的地方登录另一个用户?
- 身份验证模式:Windows身份验证.SQL Server 身份验证等...
- 通用网络和代理问题?(代理、WINS、DNS 以及网络中涉及的所有复杂性.UNC 路径可达?)
- 许可?(可能与硬件加密狗和驱动程序有关)
- 安全软件干扰?(软件/硬件防火墙、防病毒、加密工具和套件等...)
- 操作系统版本或版本?(Windows 7 问题)
- 本地化?非英语系统?
- 司机?
- 硬件?
- 编码?
- 系统损坏?(时间错误、磁盘错误、文件名和路径名太长、磁盘已满、出错")
- 目标机器性质?虚拟机?国企?目标机器是真机器吗?测试机器?
- 锁定/阻止/正在使用的文件和注册表项?
- 恶意软件?几乎可以导致任何问题.
链接:
- WiX 工具集 PermissionEx 问题 -安装后应用不运行
- EXE 文件不工作
I am currently working with visual studio 2017 with 4.6.1 .net framework. I created setup file for my desktop application the setup installs and runs perfectly in my system. The issue is that the setup installs successfully in other computers but the application not getting opened.
edit
Downloaded .net framework in client system but still same issue occurs.
edit 2
I ran a dependency scan using Dependency walker. It said there were a bunch of files the system could not find - error opening file. The system cannot find the files specified.
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
IESHIMS.DLL
Also, there was an error with modules with an x86 type found - including the setup.exe - but I am unaware how this happened. I have selected 64 wherever I saw the option listed. Please find the screenshot. If this is indeed the issue, how do I solve this?
Application Launch Problems: Here is a short version: WPF application crashes when I launch. Chattier version. Nice one from Martin Prikryl: Application does not work when installed with Inno Setup
Logs: Always check all event logs, application logs and MSI logs - if available. Just to mention it. Maybe try to attach debugger for testing as described here - provided the application gets off the ground at all. Then step through code.
The Usual Culprits: You probably just lack a runtime
(example), have a bitness problem
(32/64-bit) or insufficient permissions / privileges
, or configuration errors
(ini
, xml
, registry
, etc...
).
To summarize - torpedos, full spread below - nothing too dumb not to mention :-):
Missing Runtimes: First, always check for missing runtimes. For example:
.Net
,.Net Core
,Java
,Silverlight
,Direct X
(used even for applications now),VC++ Runtime
,MS-XML
(legacy),etc...
. Remember that they come in different versions and some can not co-exist on the box whilst others can run side-by-side.
Error Code: Looking up error codes and exception messages.
- "The Magic Number Database" - online lookup.
- Checking Error Codes - several tools and approaches.
Debugging Tools: Some information on debugging tools.
- Tools to debug dependency issues -
ProcMon.exe
,VS
,Dependency Walker
,etc...
- COM dependency errors
- Essential service debugging tools:
Event Viewer
,Task Manager
,Services.msc
Process Explorer
,NET command
,SC.exe
- Windows Services Frequently Asked Questions (FAQ)
ProcMon.exe: The tool of the trade. The one-size-fits-all tool. The bee's knees, the topper-most, the quantum leap, the cat's pajamas (yes, it is a Top Gear Hamster allusion). It can be a challenge to use it effectively, but it is the best general-purpose debugging tool that is free.
- Quick, Rudimentary Sample
- Hanselman's longer video sample
Other Ideas:
- Configuration Settings?
- Dev-box sins: Hard coded references? Test Servers / UAT links?
- Manifests, INI files and XMLfiles?
- Registry settings? HKLM / HKCU
- Connection strings. See Authentication & Authorization section below as well.
- Platform & Bitness? (ARM, Intel 32 / 64, etc...).
- Very common to read from wrong registry hive (the classic time waster):
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMyAppMySettings
(32-bit)HKEY_LOCAL_MACHINESOFTWAREMyAppMySettings
(64-bit)
- Very common to read from wrong registry hive (the classic time waster):
- Prerequisites & Dependencies?
- On the topic of dependency scanning and debugging.
- Dependency Walker: Types of dependencies.
- Does Fuslogvw.exe tell you anything? (.NET assembly binding failures for a .NET application). How the Runtime Locates Assemblies
- Quick check: Visual Studio modules view
- Missing / Broken Registration (indirect dependencies)
- Missing COM, COM Interop (regasm.exe), registrationless COM (manifest based)
- Calling a .NET Component from a COM Component
- Calling COM Components from .NET Clients
- Broken Side-By-Side Win32 Assembly Manifest (obscure, can be caused by sloppy corporate application repackaging, may strike seemingly random PCs)
- GAC installation?
- Two GACs exist.
- GAC / WinSxS Commit Issues: GAC / WinSXS files don't get installed into the GAC until the commit phase which is after StartServices.
- Missing COM, COM Interop (regasm.exe), registrationless COM (manifest based)
- Permissions & Privilege? - local - ACL permissions and NT privileges?
- ProcMon.exe
- Resolving Permission Denied:
- System.UnauthorizedAccessException while running .exe under program files
- WiX after installation my exe file doesn't work by double click, only run as administrator work
- Authentication / Authorization - network related
- Local user, domain user, Active Directory: group membership, group policy, etc...
- Launching User: User profile issues? Maybe try with another user logged on where it fails?
- Authentication Mode: Windows Authentication. SQL Server Authentication, etc...
- General Network & Proxy issues? (proxies, WINS, DNS and all the complexities involved in networking. UNC paths reachable?)
- Licensing? (conceivably related to hardware dongles and drivers)
- Security software interference? (software / hardware firewall, anti-virus, encryption tools and suites, etc...)
- OS version or edition? (Windows 7 problems)
- Localization? Non-English systems?
- Drivers?
- Hardware?
- Encoding?
- System corruption? (wrong time, disk errors, file and path names are too long, disk full, "wrong something")
- Target Machine Nature? Virtuals? SOE? Are the target machines real machines? Test machines?
- Locking / Blocking / In-Use files and registry keys?
- Malware? Can cause practically anything in terms of problems.
Links:
- WiX Toolset PermissionEx Problem - App Does Not Run After Installation
- EXE file is not working
这篇关于在客户端系统中安装后桌面应用程序无法打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!