Link to home
Start Free TrialLog in
Avatar of Varshini S
Varshini S

asked on

Unable to run the WPF application from windows startup

Unable to run the WPF application from windows startup. Do I need to specify the application startup folder or application folder in the config file?
My setup is located in d:\app\crm\ folder. But my desktop shortcut is working fine.


Registry: setup

Computer\HKEY_USERS\S-1-5-21-46785309-178999357935128-15119887777187849-1001\Software\Microsoft\Windows\CurrentVersion\Run

value name: CRM-DEMO
value data: "d:\app\crm\crm.exe"
OS : Windows 10
ASKER CERTIFIED SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
have you tried to just add your app to the startup folder?

simply place a shortcut in the following locationC:\Users\<YOURUSERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Avatar of Varshini S
Varshini S

ASKER

Thank You,

This line solved the issue: Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
Glad to help you!