win10 中的系統變量 windir、userProfile 等

■使用

之前在bat程序中看到了如下的定義

'---win10 自帶的截圖工具
Set wshShell = Wscript.CreateObject("Wscript.Shell")
wshShell.Run("%windir%\system32\SnippingTool.exe")

還有如下代碼

'---Excel 中 個人工作簿的保存位置
%userPorfile%\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB

https://blog.csdn.net/sxzlc/article/details/76559328

 

■含義

1.windir

C:\Users>echo %windir%
C:\WINDOWS

2.userProfile

C:\Users>echo %userprofile%
C:\Users\UserName

---

 

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