write a script

allow scripts to run

View Code
1 powershell.exe -command Set-ExecutionPolicy "Bypass"

 

run scripts

View Code
1 powershell.exe -command "&{%~dp0install.ps1}"

 

http://technet.microsoft.com/en-us/library/bb613481%28v=vs.85%29.aspx

 

http://blog.csdn.net/subkiller/article/details/7817885

%cd%代表的是执行文件的当前目录,强调bat是在哪里启动的;->盘符展开后是可改变的

%~dp0代表的是bat文件所在的文件目录,强调bat的文件位置     ->盘符展开后是不可改变的

相关文章:

  • 2021-08-22
  • 2021-08-09
  • 2021-09-17
  • 2021-11-19
  • 2021-06-21
  • 2021-09-18
  • 2021-06-19
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2021-10-14
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
相关资源
相似解决方案