A
A
Acroni2017-04-28 11:03:20
Command line
Acroni, 2017-04-28 11:03:20

The del command under runas does not delete a file in the windows directory, how to get around?

There is a "del...blablabla" command, which should delete some files in the system directory (actually clear the print queue, the service has already been stopped, if that). Running it through runas user "del...blablabla" the command says that the required file was not found. If you run "runas user "cmd"" then in a new window the same command works fine. As I understand it, the first window launched as a user, and not as an administrator, does not yet see the system files and, accordingly, cannot delete them. How can this be implemented to delete these files with one line from the user?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2017-04-28
@res2001

You do not understand correctly. The del command is an internal cmd command (there is no del.exe file on the system), so you need to run cmd to execute it. There are also other internal cmd commands: echo, if, for ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question