Recommended Posts

I know it isn't secure, but it is the best thing I have right now, so, here it goes...

I need to be able to run a file as an admin in a batch file (i.e. runas /u:Administrator "%blahblah%.exe").

The runas command built into Windows doesn't support this, but I know I've seen apps that do support this. Anyone know of any that are free?

Remember, the entire thing is command line. Thanks for the help :D

Link to comment
https://www.neowin.net/forum/topic/655262-command-line-runas-with-password/
Share on other sites

  Hurmoth said:
I know it isn't secure, but it is the best thing I have right now, so, here it goes...

I need to be able to run a file as an admin in a batch file (i.e. runas /u:Administrator "%blahblah%.exe").

The runas command built into Windows doesn't support this, but I know I've seen apps that do support this. Anyone know of any that are free?

Remember, the entire thing is command line. Thanks for the help :D

Hmm I dont have any free utilities. We use the program run as professional here and it does command line and batch file.

Is this what your looking for -- it allows password on the command line

http://www.softtreetech.com/24x7/archive/53.htm

Not sure if its free or not - but you can download from this page, and it seems to run just fine, etc.

edit: Here is some info you might be interested in as well

http://www.commandline.co.uk/sanur/

Free Runas Alternatives

* CPAU Runas alternative supporting encoded passwords.

* LSrunas/LSRunase Console based Runas alternatives, the latter supports encoded passwords.

* AutoIt (v3) Scripting language for automating the Windows GUI.

* SuperExec GUI that encrypts passwords using Windows cryptography API's

BTW the AutoIT would get my vote --- its a tool any admin should have access to.

  XgD said:
But if the other option is to have the password in plaintext in the batch file
But there were many options give than allow you to encode/encrypt the password so that its not plain text, or you could turn the batch into an exe so they can not clearly read the password, etc.

There are other ways to obscure the password in a batch file, /savecred is cut and dry the user can run anything they want without even knowing anything just click use saved credentials.

Off the top a simple method would be to just turn your batch file with the commands in it to a exe. XP comes with the tool IExpress that can do this.

Or you use one of the many free batch to exe converters out there, etc.. etc.

+Budman's right. AutoIt makes this easy (for XP anyway):

; Are we already admin?
If Not IsAdmin() Then
	RunAsSet($CmdLine[1],'' , $CmdLine[2])
	Run( $CmdLine[3]  )
	Exit
EndIf

Save this script as BatchRunAs.au3 (or whatever) and compile it to an executable with Aut2Exe. Then in the batch file just add the line

BatchRunAs.exe <Username> <Password> Command

If required the username, password and the program to be run can all be hard coded (change the CmdLine[] parameters in the above script), before converting to an exe.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The Start menu in Windows 11 is the Start menu I dislike the most.
    • Apple's AI models still trail behind OpenAI's GPT-4o despite latest update by Pradeep Viswanathan At WWDC 2025, Apple announced several updates related to Apple Intelligence for both developers and consumers. With the new Foundation Models framework, developers can now bring AI experiences to their apps that work offline in a privacy-preserving way and are available free of charge. The Foundation Models framework is built on Apple’s own in-house-developed AI models. Apple also unveiled a new generation of language foundation models. According to Apple, these updated models are faster, more efficient, and offer improved tool use, better reasoning capabilities, multimodal support for image and text inputs, and support for 15 languages. Apple Intelligence includes two foundation models: A 3-billion-parameter model that runs on-device using Apple Silicon. A server-based mixture-of-experts model optimized for Private Cloud Compute. Apple noted that the on-device 3B language model is not designed to be a general-purpose chatbot. Instead, it is intended to perform text-related tasks such as summarization, entity extraction, text understanding, refinement, short dialogues, and creative content generation, among others. The big question is how well Apple’s models perform compared to other leading models on the market. Rather than using standard AI benchmarks, Apple shared results from its own internal evaluations of fundamental language and reasoning capabilities. According to Apple’s text-based evaluations, its on-device 3B model performs favorably against the slightly larger Qwen-2.5-3B and competitively against the larger Qwen-3-4B and Gemma-3-4B in English. Its server-based model performs slightly better than Llama-4-Scout but falls short compared to Qwen-3-235B and OpenAI’s proprietary GPT-4o. In evaluations involving image input, Apple’s on-device model outperforms InternVL and Qwen, and performs competitively against Gemma. While Apple’s server model beats Qwen-2.5-VL, it underperforms when compared to Llama-4-Scout and GPT-4o. These results highlight how far Apple still has to go in foundational AI capabilities. It seems Apple compared its models to GPT-4o to make its performance appear relatively decent. If Apple were to compare its results against OpenAI’s latest O-series models or Google’s Gemini 2.5 Pro, the gap would likely appear much wider. It will be interesting to see how Apple navigates the AI era with its in-house capabilities in the years ahead.
    • Voe 3 video generation has gone viral. Especially with audio they look realistic. People posting tons of wild videos created by ai is insane
    • Vive tool again. Sigh, no thanks.
  • Recent Achievements

    • Week One Done
      IAMFLUXX earned a badge
      Week One Done
    • One Month Later
      Æhund earned a badge
      One Month Later
    • One Month Later
      CoolRaoul earned a badge
      One Month Later
    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      492
    2. 2
      ATLien_0
      268
    3. 3
      +FloatingFatMan
      230
    4. 4
      +Edouard
      199
    5. 5
      snowy owl
      152
  • Tell a friend

    Love Neowin? Tell a friend!