我试图在Windows Azure角色上运行启动任务cmd脚本.
这是命令文件脚本的两行:
powershell $command = "set-executionpolicy Unrestricted"
powershell $command = ".\setupAgent.ps1" -NonInteractive >; out.txt
Run Code Online (Sandbox Code Playgroud)
现在问题是,我从命令shell收到一条错误消息,说:
D:\Users\UserAccount>???powershell $command = "set-executionpolicy Unrestricted"
'???powershell' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
它看起来像是使用某种不同的代码页或某些内容,因为这些特殊的字符不在我的cmd文件中.cmd文件是在Windows 8上通过VS 2012 Ultimate创建的.
你有一个想法,我怎么能在命令开头解雇那些特殊的字符?如果我通过远程桌面将命令从cmd文件复制到控制台,它可以正常工作!
whatever.cmd使用VS 2012 Ultimate 打开文件.单击对话框上的File- > Save whatever.cmd as- >,[save]按钮旁边有一个小箭头.它将显示一个菜单,其中包含以下选项Save with Encoding:

选择它.现在从可用编码列表中选择"US-ASCII Codepage 20127".
| 归档时间: |
|
| 查看次数: |
897 次 |
| 最近记录: |