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

    • How to take HDR screenshots on your iPhone running iOS 26, and other new features by Aditya Tiwari Apple has leveled up the screenshots game on its latest iPhone software update, iOS 26. Alongside the updated Photos app, Compact mode in Safari, and new wallpapers, iOS 26 comes with a redesigned screenshot editor, featuring the controversial Liquid Glass system design. The iOS 26 update brings new features and changes that let you customize your screenshot experience in a better way. For starters, it displays the captured screenshot with rounded corners, shifting away from the rectangle on iOS 18. Turn on HDR screenshots on iOS 26 A highlight of the updated screenshots features on iOS 26 is that you can take screenshots in HDR (High Dynamic Range). Apple has added a new Screen Capture page in the Settings app that lets you do that. You can follow these steps to enable HDR screenshots on iOS 26: Open the Settings app on iOS 26. Go to General > Screen Capture. Now, select the HDR option under the Format section. Press the Home + Volume Up button combination to take a screenshot. Next time you take a screenshot on your iPhone, it will be captured with full dynamic range and stored in HEIF format. In other words, if you take a screenshot of a photo and video available in HDR, the feature will preserve those details. On the other hand, the SDR quality saves screenshots in PNG format and offers more compatibility. As shown in the image below, you can check whether a screenshot is captured in HDR or not by swiping up on a screenshot in the Photos app to open its details. Record your iPhone screen in HDR on iOS 26 Not just screenshots, the HDR option also works for screen recordings. Such files are saved in HEVC HDR10 format, whereas screen recordings taken in SDR mode are saved in HEVC. After switching to the HDR options using the steps above, you can use the same old steps to screen record your iPhone; the option is available in the Control Center. That said, you can do a lot more to improve your screenshot experience on iOS 26. The Screen Capture page in the Settings app lets you customize your screenshot experience in multiple ways. Here's how use can use the different features Apple has added in iOS 26. Turn on full-screen previews by default When you turn on the "Full-Screen Previews" toggle button on the Screen Capture page, iOS 26 will display screenshots in full view instead of showing a small thumbnail in the bottom left corner that vanishes after a few seconds. The full-blown UI allows you to quickly edit or annotate a screenshot and share it with your friends across various apps. Alternatively, you can disable the toggle option and trigger this UI by tapping on the temporary thumbnail that shows up after taking the screenshot. Prevent CarPlay screenshots from flooding your device Apple has also changed (fixed) how screenshots work on CarPlay. Until now, screenshots on CarPlay have been an "it's a feature, not a bug" experience for the users. If your iPhone is connected to your car, an extra screenshot of the CarPlay interface is automatically captured when you press the buttons to take a screenshot on your phone. This functionality has been a pain point for many users, who have raised their voice on Apple's support forums. It seems the company heard them, and iOS 26 update brings a new toggle button in the picture, allowing you to have a manual way to enable or disable CarPlay screenshots. Use Visual Intelligence on screenshots iPhone's screenshot tool also supports the improved Visual Intelligence feature (works on iPhone 15 Pro or later). You can select objects in a screenshot and search for matching content in apps that offer integration with Visual Intelligence. These screenshot updates for iOS 26 are currently available for testing through the developer beta program on supported iPhone models. Apple is expected to release the first public beta of iOS 26 next month. If you plan to install the developer beta on your device, note that early builds may be unstable, and ensure that you back up your data in advance.
    • Looking around, it seems to indicate that an App is doing a download in the background.
    • Dopamine 3.0 Preview 39 by Razvan Serea Dopamine is an awesome free audio player which tries to make organizing and listening to music as simple and pretty as possible. Dopamine has been designed for Windows 7, Windows 8.x and Windows 10 and plays mp3, ogg vorbis, flac, wma and m4a/aac music formats quite well. The best part? It's created by long-time Neowin member, Raphaël Godart. If you’re looking for a music player to handle a large music collection, you should definitely give Dopamine a try. Dopamine 3.0 Preview 38 changelog: Added Added Ctrl-F shortcut to focus the search bar and ESC to clear it Added support for cover art images that have file name albumart.jpg, albumart.jpeg or albumart.png Added Turkish translation Changed Slightly improved the look of the mini player Improved scaling of text on Now Playing screen for smaller screens Order selections are now menus instead of toggle buttons Updated the Brazilian Portuguese translation Updated the Spanish translation Updated the Turkish translation Updated the Vietnamese translation Fixed Fixed an issue where a random song would start playing after the queue ended when using gapless playback. Fixed an issue where album lists were not refreshed after a search returned no results. Fixed an issue where progress was not reset to 0 when playback has finished Fixed an issue where a track that is longer than 4 minutes was scrobbled to Last.fm immediately after it started playing Fixed some sizing issues on the "Folders" screen Fixed search problems Download: Dopamine 3.0 Preview 39 | 98.4 MB (Open Source) View: Dopamine Home Page | Forum Discussion | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Here's what to expect from Samsung's July Unpacked event by Hamid Ganji Samsung held its first Unpacked event of the year in January to unveil the Galaxy S25 series. However, the Korean OEM is also gearing up to hold its second 2025 Unpacked event sometime next month, focusing on its next-generation foldable phones and a new pair of Galaxy Watch wearables. Samsung might also give us a detailed look into the upcoming Project Moohan XR Headset and a rumored tri-folding smartphone that might launch later in the year or early 2026. One UI 8 is another topic Samsung might discuss at the event. Here's everything we expect Samsung to unveil at next month's Unpacked event. When the event kicks off To date, there have been conflicting rumors about when the Unpacked event will start. However, the latest hint comes from renowned tipster Evan Blass, who says the second 2025 Unpacked event begins on July 9, 10 AM EDT. Samsung has yet to confirm the alleged date, but it aligns with the company's unveiling of the Galaxy Z Fold 6 and Flip 6 on July 10 last year. New foldables are down the road Galaxy Z Fold 7 and Galaxy Z Flip 7 will take the stage at the upcoming Unpacked event. Both phones will offer upgrades compared to their predecessors, but the overall design is expected to remain relatively the same. Some sources have claimed Z Fold 7 would be Samsung's thinnest foldable ever, presumably 4.5mm thick when fully unfolded. Also, Z Fold 7 might get a bigger screen at 6.5 and 8.2-inch. Samsung might also switch to a 200MP camera in the lineup. Other rumored specs for Samsung's next-gen foldable include Snapdragon 8 Elite, a 4,400 mAh battery, and One UI 8 out of the box. Meanwhile, there are also some swirling rumors about a so-called Galaxy Z Flip 7 FE (Fan Edition) in the pipeline. The device could be a stripped-down version of Samsung's Galaxy Z Flip 7 with lower hardware specs and a cheaper price tag. A new pair of smartwatches Samsung will also reveal the Galaxy Watch 8 and a Classic variant at July's Unpacked event. As for design, we don't expect a radical makeover for the Galaxy Watch 8, but the Classic model could take most of its cues from Samsung's Galaxy Ultra watch models. Also, the Watch 8 Classic could bring back the rotating bezel on top. Both watches will come with One UI 8 Watch out of the box and Gemini AI to replace the Assistant. Gemini could help with health features and keep track of users' physical activities. Samsung was also rumored to be working on Blood glucose monitoring for next-gen smartwatches, and it might finally make its debut at the upcoming Unpacked event. More details about July's Unpacked event will surface in the days leading up to it. You can watch the live stream of the event through Samsung's website or the company's YouTube channel.
  • Popular Contributors

    1. 1
      +primortal
      637
    2. 2
      ATLien_0
      231
    3. 3
      Michael Scrip
      219
    4. 4
      Xenon
      145
    5. 5
      Steven P.
      141
  • Tell a friend

    Love Neowin? Tell a friend!