Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Bat file running as administrator does not work

02 Aug 2014   #1
goshenBleeping

Windows 7 Home Premium 64bit
 
 
Bat file running as administrator does not work

Here is my test bat file:
@echo off
echo\
echo "Hello David"
echo\
pause

If I run this very simple bat file in a user account or admin account, or in an elevated command window, it works fine - I see the text and the pause - no errors. But if I run the bat file as Administrator (mouse right click) or use a shortcut to the bat file that runs as administrator, the window appears and immediately disappears. I do not see the text or the pause. Why? What am I missing?


My System SpecsSystem Spec
.
02 Aug 2014   #2
Brink

64-bit Windows 10 Pro
 
 

Hello David,

It may be an issue with the registry for "Run as administrator". If you like as a test, use step 2 in the tutorial below to restore "Run as administrator" to the context menu. This will also restore the default registry entries for it, and hopefully allow it to run properly afterwards.

Run as Administrator - Add or Remove from Context Menu in Windows 7
My System SpecsSystem Spec
Reply

 Bat file running as administrator does not work




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Process - See if running as administrator (elevated)
How to See if Process is running as administrator (elevated) in Vista and Windows 7 This tutorial will show you how to determine if a program or process is running as administrator (elevated) or not in Vista and Windows 7. Here's How:
Tutorials
Selectively deactivate UAC without running as administrator
Hi all, I'm facing the following issue : I'm trying to run two programs at the same time but are both troubled by the UAC level. Program 1 does work when the UAC is at level D (lowest) and doesn't work otherwise. In any case, it bugs if ran as administrator Program 2 does work when the...
Software
How To Trick App Into Thinking You're NOT Running As Administrator?
Hello again. I have installed a program called Dragon NaturallySpeaking. it is a dictation program for microsoft office and stuff like that. It has to be installed as admin, but when just trying to run the program after install it pops a message saying "This program should not be run in Elevated...
General Discussion
Question about: running in administrator mode
Hello and Happy new Year to you all. I am having some issue running my compute as an "administrator". I know that because when I run CMD in administrator mode, I stay in the user part not on system32 as explained on a post in the forum and I cannot delete some files or folder. Could...
General Discussion
How to tell if a user is running as Administrator?
I am writing a batch file for a group of people that might or might not know how to run as admin. I would like to know if there are any files or varibles that are different for the admin or the current user.
General Discussion
Running everything as administrator...why?
Finally got x64 RTM installed tonight and everything worked out...mostly. My problem is that I have to run almost everything as an administrator. If I don't, the app will open briefly, then close. But it stays running under just a few megs of RAM in the Task Manager. Happens on Firefox, IE 8...
Software


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:34.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App