java CreateProcess error=740 請求的操作需要提升的問題

Java中有時候執行一個exe程序經常會包CreateProcess error=740, 請求的操作需要提升的錯誤 如下:


public static void main(String[] args) { 
  try {
  Runtime.getRuntime().exec("d:\123.exe");
  } catch (Exception e) {
  } 



CreateProcess error=740, 請求的操作需要提升!


解決方法:

public static void main(String[] args) { 
  try {
  Runtime.getRuntime().exec("cmd /c d:\123.exe");
  } catch (Exception e) {
  } 



CreateProcess error=740, 請求的操作需要提升!
CreateProcess error=740, 請求的操作需要提升!
發佈了20 篇原創文章 · 獲贊 40 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章