Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello everyone,
I made a WinForms App using C#, and even created an installer for it. However, as soon as I double-click it from another user, it just wouldn't open.

Can anyone please help?

What I have tried:

I tried changing the file paths in my code to make them depend on the user files and folders, but it doesn't change anything.
Posted
Updated 26-Jul-23 23:16pm
Comments
Graeme_Grant 27-Jul-23 4:25am    
Have you tried adding an unhandled exception handler and show the error message?
LiterallyGutsFromBerserk 27-Jul-23 4:34am    
What I did was publish the app, then copy the published app folder (including the setup) into another user's folder (using a shared directory) before starting it. While it does work with my session, whenever I log in with another session, it doesn't work
Graeme_Grant 27-Jul-23 4:45am    
You did not answer what I asked.
LiterallyGutsFromBerserk 27-Jul-23 5:02am    
how do I add an unhandled exception handler
Richard MacCutchan 27-Jul-23 4:30am    
"Can anyone please help?"
As it stands, most unlikely. We have no idea what your application does, or even which version of .NET it was built against.

1 solution

To see what is happening, try capturing undandled exceptions: Application.ThreadException Event (System.Windows.Forms) | Microsoft Learn[^]
Store to a file and raise as a MessageBox so that you can see what the error is.
 
Share this answer
 
Comments
LiterallyGutsFromBerserk 27-Jul-23 5:19am    
It might have to do with my database being local. That's why I'll try and see how I can make it present on the network

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900