Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to run batchfile with administrator's authority?

$
0
0

Referring to following codes, it simply backup everything from D: to F:.

If I am using administrator account, it works fine, but once I switch to user account under user group, then I get no authority to run those codes.

Does anyone have any suggestions on how to run those codes as administrator under user account?
Thanks in advance for any suggestions :>

@echo off
REM  set /p confirm=Proceed with format operation on O: (y or n)?
REM  echo %confirm%|find /i "y" > nul || goto :EOF
  echo Formatting F: ...
  echo Y|format F: /q || goto :EOF
  echo Copying D: to F:
  RoboCopy D:\ F:\ /MIR /R:1 /W:1


Thanks in advance for any suggestions


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>