In normal console app I have this
Environment.SpecialFolder.LocalApplicationData is C:\Users\Simon\AppData\Local\
In Windows service
Environment.SpecialFolder.LocalApplicationData
is C:\Windows\system32\config\systemprofile\AppData\Local\
How can I specify same path in both type of application?
Remember that the services run under a different user profile (can be a LOCAL_SERVICE, NETWORK_SERVICE, etc.) If you'd like them to be the same, run the service under your user profile (You can specify this ServiceProcessInstaller.Account property when you create the installer, or in the Services manager of windows).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With