設置開機自啓動腳本

實驗環境:windows7

打開記事本編寫腳本,完成後將文件存入C盤根目錄下test文件夾,格式爲bat

time /t>>c:\test\log.log
whoami >>c:\test\log.log
echo %username% >>c:\test\log.log
echo %computername% >>c:\test\log.log

按住菜單+R打開運行,輸入gpedit.Msc打開本地策略編輯器,選擇Windows設置———>腳本(啓動關機),添加腳本2.bat並確定。

重啓計算機,查看log.log文件

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章