如何使用批处理文件中的Runas命令运行批处理文件

时间:2017-11-23 12:23:40

标签: windows batch-file

这是我们的批处理文件,我们有这个代码,但它没有运行run.bat文件。 给出错误: 未被识别为内部或外部命令

@echo off
SET Identity=%userdomain%\%username%
CALL :ICACLS "%Identity%"
SET mypath=%~dp0
echo %mypath:~0,-1%
runas /noprofile /user:%Identity% "cmd /K %mypath%\run.bat"

0 个答案:

没有答案