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

Executing Batch Script as Standard User

$
0
0

Hello

I'd like to ask regarding Batch Scripting. Let's say I have a standard user account on a computer and want to run a Batch file but with Administrator priviliges. Is there a way to insert a certain type of code that will bypass or execute instructions with elevated rights, or just saying yes automatically when prompted for Admin rights to proceed with the execution? Main reason is why I'm asking because when I am running a batch script it ignores some of the files that I want to be deleted for a custom made system maintenancing script which deletes internet browsing history etc. And I want this file to be accessible to standard users as well when running but without asking for any credentials, and executing it with admin rights. I was able to find code to input /runas but I couldn't find a proper example. I have Googled my research and watching YouTube tutorials alike but none seem to match my need to solve my problem. Each individual requesting assistance with similar problems regarding using Admin priviliges as Standard user but their problems have their own unique issues which requires me to look further. Any help regarding the matter would be greatly appreaciated.

Thank you in advance.
26/07/2014


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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