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.
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_MACHINE\SOFTWARE\WOW6432Node\MyApp\MySettings
(32-bit)HKEY_LOCAL_MACHINE\SOFTWARE\MyApp\MySettings
(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)
- 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.
- Permissions & Privilege? – local – ACL permissions and NT privileges?
- 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: