启动 Program Files 文件夹中的程序
Start a program that is in Program Files folder
我想用 java 启动一个 exe。
此 exe 位于 Program Files (x86) 文件夹中,当我尝试时:
Runtime.getRuntime().exec("C:\Program Files (x86)\CodFiscExtractor\MySQLServer\MySqlStart.exe");
控制台向我显示此错误:
CreateProcess error=740, The requested operation requires elevation
我该怎么办?
编辑:这不是 this 的副本,因为我问的是 java
我解决了,干脆我这样写了:
Runtime.getRuntime().exec("cmd /c \"C:\Program Files (x86)\CodFiscExtractor\MySQLServer\MySqlStart.exe\"");
现在我没有错误,但我很想不显示 UAC window,因为 MySqlStart.exe
以管理员权限开始。
我想用 java 启动一个 exe。
此 exe 位于 Program Files (x86) 文件夹中,当我尝试时:
Runtime.getRuntime().exec("C:\Program Files (x86)\CodFiscExtractor\MySQLServer\MySqlStart.exe");
控制台向我显示此错误:
CreateProcess error=740, The requested operation requires elevation
我该怎么办?
编辑:这不是 this 的副本,因为我问的是 java
我解决了,干脆我这样写了:
Runtime.getRuntime().exec("cmd /c \"C:\Program Files (x86)\CodFiscExtractor\MySQLServer\MySqlStart.exe\"");
现在我没有错误,但我很想不显示 UAC window,因为 MySqlStart.exe
以管理员权限开始。