How to ask for administer privileges on Windows with Go

后端 未结 2 1765
夕颜
夕颜 2021-01-31 11:08

What I want to achieve for my application, is to not need to right click and choose Run as administrator each time I want to run it. I want Windows to

2条回答
  •  萌比男神i
    2021-01-31 11:52

    You need to embed a manifest file which will tell Windows that you want elevated privileges.

    The example from that page is:

    
    
    
    My App
    
        
            
                
            
        
    
    
    

    This go-nuts post suggests that using rsrc should do the trick for you.

提交回复
热议问题