Run program c# at startup windows

MiPakTeh 1,476 Reputation points
2021-05-12T01:04:03.167+00:00
Developer technologies C#
{count} votes

Accepted answer
  1. Daniel Zhang-MSFT 9,651 Reputation points
    2021-05-17T01:32:47.447+00:00

    Hi @MiPakTeh ,
    What version of your Windows system?
    And you can try to run Services as an administrator

    1. Click on Start.
    2. In the start Search box type “Services”.
    3. Right Click on run as administrator.
      97003-517.png
      Best Regards,
      Daniel Zhang

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. cheong00 3,486 Reputation points Volunteer Moderator
    2021-05-12T03:01:37.427+00:00

    Check and see if sOri actually exists.

    Also, if sOri points to network mounted folders, the network path may not be accessible yet.

    It will be useful to debug if you can wrap your Form1_Load() content in try...catch... block and show the exception message with MessageBox.Show().

    You may find corresponding error event in Event Viewer -> Application too since the error is not handled.


  2. cheong00 3,486 Reputation points Volunteer Moderator
    2021-05-17T02:33:19.673+00:00

    You don't have right to listen to folders that you don't have access to.

    Try limit the access to somewhere that user can write instead.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.