SetACL error
Posted: 12 Aug 2022 12:20
I have a batch file that I'm trying to create and I'm getting an error:
This is the error:
This is the bat file:
Can someone please help fix this error?
Thank you,
Docfxit
This is the error:
Code: Select all
C:\Batch>"C:\Batch\SetACL.exe" -on C:\Windows\system32\spool\Printers -ot file -actn ace "n:Gary;p:full"
ERROR in command line: No parameter found for option n:Gary;p:full!
Code: Select all
net stop spooler
@Echo off
If not exist "%~d0\Batch\SetACL.exe" (
cls
Echo.
Echo.
Echo %~d0Batch\SetACL.exe Not Found!!!
Echo.
Echo Please get SetACL.exe and restart this file.
Echo.
Pause
exit
)
@Echo On
set folder=%WINDIR%\system32\spool\Printers
"%~d0\Batch\SetACL.exe" -on %folder% -ot file -actn ace "n:%username%;p:full"
del /F /q %WINDIR%\system32\spool\PRINTERS\*.*
net start spooler
pause
Thank you,
Docfxit