2017-06-13 38 views
0

我試圖使用runas和xcopy將它複製到c:\ Windows \ System32 scr文件並崩潰我的應用程序。我在ClojureScript寫,所以我的代碼如下所示:runas xcopy崩潰我的電子應用程序

(runas "C:\\Windows\\System32\\xcopy.exe" 
     #js ["C:\\Users\\pupeno\\Documents\\Dashman\\clients\\dist\\win-unpacked\\Dashman.scr" 
      "C:\\Windows\\System32\\" 
      "/F"]                      
     #js {:admin true}) 

其編譯爲:

configurator.main.runas.call(null, 
          "C:\\Windows\\System32\\xcopy.exe", 
          ["C:\\Users\\pupeno\\Documents\\Dashman\\clients\\dist\\win-unpacked\\Dashman.scr", 
           "C:\\Windows\\System32\\", 
           "/F"], 
          ({"admin": true})); 

當我運行這段代碼,有人問我輸入密碼,但然後應用程序只是凍結。任何想法可能是錯誤的嗎?

謝謝

回答

0

發現問題。 xcopy提示覆蓋權限,添加/ Y屬性解決了這個問題。另外,令人驚訝的是,無論將catchOutput設置爲true還是不true,我都無法從xcopy獲取任何輸出。