Programmatically check whether Windows 7 is activated

前端 未结 5 1466
慢半拍i
慢半拍i 2021-02-14 12:13

Background: I am creating system images that will be loaded onto several workstations. Windows activation will occur after the images are loaded onto the workst

5条回答
  •  时光取名叫无心
    2021-02-14 12:21

    You can run "Slmgr.vbs" on the machine and then redirect the output to check.

    System.Diagnostics.Process.Start(@"cscript Slmgr.vbs > D:\\log.txt");
    

    This will return all the information you need. Not the cleanest way to do it though.

提交回复
热议问题