c# add program to windows startup (windows 7)

后端 未结 1 573
死守一世寂寞
死守一世寂寞 2021-01-26 18:10

I\'m trying to add my program to the windows start up programs by adding the program execution path to the registry editor.

This is the code:

RegistryKey         


        
相关标签:
1条回答
  • 2021-01-26 18:28

    Off-topic: add a null check before trying to set the value, or write with a questionmark like so "registryKey?.SetValue(..."

    0 讨论(0)
提交回复
热议问题