Jump to content

run bat file as administrator without creating shortcut


microcrafters

Recommended Posts

I have a batch file that i have added to the right click context menu of my recycle bin. it calls several programs on my computer. whenever i run it in vista the user account control pops up for every seperate program my batch file runs. I can prevent this by running the program as administrator. the context menu uses a command line to call the batch file.

I've tried using the runas command but then i have to enter the username and/or password for the admin account. i want to be able to use this on someone elses computer. so i want to be able to run it as administrator without needing to know the user name or password

essentially i need a command line command that will run a batch file as administrator (or with admin rites) without the need to know user name or password

Link to comment
Share on other sites


essentially i need a command line command that will run a batch file as administrator (or with admin rites) without the need to know user name or password
As would every malware author out there, I bet.

So the logged-on user isn't an admin, and each of the programs called from the batch file is attempting to run elevated (hence the multiple prompts) from a batch file that was not launched elevated... this is expected behaviour.

The only way I would expect a user to be able to select such an option and not have privilege issues would be if a call was being made to a service running under a privileged user account - then the idea would be that the service does the job on behalf of the user (hopefully in a secured, non-exploitable manner).

Similar to how AV interfaces allow a regular user to "clean" an infection when they would not have the explicit privilege to access the file.

What exactly are these programs trying to do with the contents of the Recycle Bin?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...