Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Windows 7


Run Bat File As Administrator?

I know there is a checkbox in the propertires of a batch file where you can select that this file should always be run as admin. But that checkbox is for me grayed out and inactive both on my Windows 7 Ultimate home system and on a Server 2008 at work.

View 3 Replies (Posted: Apr 27, 2010)

Sponsored Links:

Related Forum Messages For Windows 7 category:
Getting A .bat File To Run When A File Is Added To A Folder?
getting a .bat file to run when a file is added to a folder.. E.G When a file is downloaded to the downloads folder the .bat file runs and is moved to a separate location.

Posted: Dec 23, 2012

View 1 Replies!   View Related
Unable To Edit / Run BAT File - Windows 7 SP1
I installed an old game R6Vegas2 to c:/games instead of the protected program files (default install location) the game it's self works fine, but it's a mod for this game that uses bat files, teknor6vegas2.exe which then injects it's code into the games .exe so I need to be able to edit the bat file and run it. So far all that happens is the dos cmd window opens and closes within2 seconds nothing else things that I have tried,disabled uac, taken ownership /full control copied a shortcut to the desktop (.bat file) and changed to run as admin all made no difference at all, in win xp it works without all this faffing around

Posted: Oct 25, 2011

View 7 Replies!   View Related
Run Batch File As Administrator?
How could I run a batch file as an administrator without any user involvement. I just want when the file is clicked on to start running as an admin because it is copying files in the Programs directory and cannot do it without administrator privileges.

I have this... runas /noprofile /useran-SlateDan cmd but that requires me to have to type my password, and also just opens up a new shell and does not actually elevate the shell that it ran in.

Posted: Mar 10, 2011

View 11 Replies!   View Related
How To Always Run Batch File As Administrator
I've made a batch file, but i don't know how to make it to always run as administartor. In .bat's file properties the option "always run as administartor" is grayed out. I have to right click it and then choose "run as administartor" from context menu. But i don't want to do it every time because it's annoying, is there any way to make run as admin if option is grayed out in properties?

Posted: Mar 16, 2011

View 1 Replies!   View Related
BAT Files Will Not Run?
I'm currently running a Minecraft server and have been attempting to allocate more memory to the server. Now, I have searched online and determined that if I run a batch file with the correct information, it will correctly allocate the amount of memory to this server. That's all fine and dandy.I am able to create a text document, edit the information to suit my needs, and then save it as a batch file in the server's folder. The problem I am having is, I can't seem to get the .bat file to run. When I click on it to run, it simply flashes as though it opened and closed immediately, leaving me no time to ensure it is running. (no, it's not saved as a txt file)

Posted: Nov 21, 2011

View 4 Replies!   View Related
Cant Run .bat Files In Windows 7 X32 With Uac Disabled?
Cant run .bat files in windows 7 x32 with uac disabled?

Posted: Feb 2, 2012

View 9 Replies!   View Related
Cannot Open .bat File
I work at an attorneys office and we subpoenaed a surveillance video from a local gas station. They sent us a CD with a file titled "viewer.bat", but I'm not sure what to do with it.

When I try to open it I receive the error message "viewer.bat not a valid Win32 application". I'm also not sure how a .bat has anything to do with a video file (unfortunately I have no experience with .bat files).

There are is also a folder on the CD called "disstech" and it has three folders in it called "bin", "dis" and "log". What am I working with here?

OS Version: Microsoft Windows 7 Professional, Service Pack 1, 64 bit
Processor: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, Intel64 Family 6 Model 42 Stepping 7


Posted: Sep 6, 2012

View 5 Replies!   View Related
Encrypt A .bat File?
its possible to encrypt a .bat file so when you edit the file it won't be readable?

Posted: Nov 26, 2010

View 5 Replies!   View Related
Change Computer Name With BAT File?
Would like to know if its possible to change the computer name using a bat file, on Windows 7 64bit.

Posted: Jun 25, 2012

View 8 Replies!   View Related
Lost Pics In Locker.bat File
i have lost my pics in locker.bat file,,, i moved the folders to another location and they are no longer there and are not in recycle bin.

Posted: Nov 26, 2012

View 2 Replies!   View Related
Lost Pictures In Locker.bat File?
i have lost my pics in locker.bat file,,, i moved the folders to another location and they are no longer there and are not in recycle bin?

Posted: Nov 26, 2012

View 6 Replies!   View Related
Create A Bat File That Changes Multiple GUI Settings?
I regularly need to turn off windows 7 GUI settings such as aero,certain services,unload certain apps in memory, all in win 7 ultimate. These settings will always be the same. I would like to know if it is possible to create some sort of file*batch file?) which would turn these settings off, and also a separate file which would turn them back on again when i wanted them all back.

I am familiar with working with simple .bat files, and converting them into .exe's and attaching them to shortcut icons. So my only question is where do i find examples of how to write lines of code to manipulate the windows interface.

Posted: May 8, 2011

View 2 Replies!   View Related
How To Code A Bat File To Restart Explorer And 2 Programs
hat am I doing wrong? The code stops after explorer.exe is restarted. I know this because the command prompt does not show the echo "-explorer restarted". When I look at the command prompt, the cursor seems to be on the next line, but without the normal C:UsersJohnSmith> in front of it (there is nothing in front of the cursor).
Also, if I include the command "exit" at the end of my .bat file, it doesn't seem to work. Even though if I type in exit into command prompt, the window closes.

Posted: May 22, 2012

View 2 Replies!   View Related
Creating Bat File For Restart Display Adapter?
I have to boot twice for my display adapter to start. Im making a bat file in startup folder who does this operation for me, but i cant get further than starting device manager.

Here is my .bat file so far: set DEVMGR_SHOW_DETAILS=1 start devmgmt.msc

Posted: Apr 12, 2011

View 3 Replies!   View Related
Changed BAT File Association And Can't Get It Back
I went to Control panel->Default programs->Associate a file type with a program and changed the association to file .BAT to explore.exe.Now, when I click on a bat file with the mouse, the whole desktop starts shaking. I think it goes into a loop.The problem, when I go back to Controlpanel-> Default programs->Associate a file type with a program.The extension .BAT is no longer there! It is gone.And when I examine the file property of some .bat file, there is no option to change what to open it with. There is no open with... only OPEN option.There is also no way to add a new file extension in Control panel->Default programs->Associate a file type. I can't add .bat again.I did Control panel->Default programs->Set progream access and computer defaults but still the .bat file association is broken, and when I double click on it, same thing happens.Now when I right click on a .BAT file from exploer, I also do not see the EDIT option any more.

Posted: Jun 4, 2010

View 6 Replies!   View Related
Bat File To Launch PowerDVD Plugin From Desktop
I am looking to create a bat file that will launch straight into the Powerdvd 12 plugin within Media Centre. I have seen posts where people have done this with the Netflix plugin but can't find anything for Powerdvd.

Posted: Jan 14, 2013

View 1 Replies!   View Related
Launching Program From Task Scheduler Without Using BAT File
I just discovered the task scheduler and I am using it to start programs at logon, like eraser. The only problem is I would like to start them minimized and I can't quite figure out how to do that. I have set the program properties to run minimized but it doesn't want to play nice. Is there anyway I can get the program to launch from task scheduler without using a bat file?

Posted: Sep 22, 2012

View 7 Replies!   View Related
Bat File Not Opening Locker Even After Giving Right Password
I used a .bat file method to lock my files in locker in starting it worked great but suddenly it stopped working like now when I am giving password in .bat file command prompt it just don't get's open the locker and ask again and again for password even though i am giving a right password. I have some important files in .bat locker which is not opening even entering right password

Posted: Sep 7, 2012

View 5 Replies!   View Related
Create A Shortcut To A *.bat Batch File In The SAME (unknown) Folder?
I have written a batch file ( which can take several paramters and runs fine as long as I enter the start command at the command prompt e.gaaaa.bat -start -logIn order to avoid always having to enter manually this command I created a shortcut to this batch file and placed it in the SAME directory and added once the desired parameters. The shortcut properties look like now:Target: D:proj2 est2011aaaa.bat -start -logStart in: D:proj2est2011This works fine as well. Now the problem comes: I want to make these batch file and its shortcut portable.That means users should be abel to copy both files (batch + shortcut) on their computer in an indiviual different directory and be able to start the shortcutted batch file WITHOUT adjustments as well.

BUT this does not work because "Target" and "STarted in" most problably have a different path (e.g. C:evalproj ask23).My first approaches to solve this problems were to omit the path like in:Target: aaaa.bat -start -logStart in: .But this does not help. If I try to apply the settings above for the shortcut I got an error popup:"The name aaa.bat' specified in the target box is not valid"Hmm, how do I specify in the shortcut=SAME DIRECTORY AS CURRENT SHORTCUT FILE otherwise?

Posted: Sep 21, 2011

View 1 Replies!   View Related
Running Bat File To Get All IPs And Mac Addresses On Network?
I am trying to run a batch file (arpping.bat) that will get all of the IP's and mac addresses on the network. Here is the batch file:
REM arpping.bat
ping -n 1 -l 1 %1.%2
arp -a %1.%2

I run the following command from the command line:
C:\> for /l %i in (1,1,254) do arpping 160.82.220 %i

I the receive the following, repeating, output line at the command line: "The process cannot access the file because it is being used by another process." This keeps repeating until I hit Ctrl C. Not sure where the problem is.

Posted: Jul 2, 2011

View 3 Replies!   View Related
Programmatic Way With BAT File Determining If Elevated Command Prompt
Is there any programmatic way within a BATch file of determining whether it has been started from an elevated command prompt (run as Administrator) or a normal command prompt? I note the difference between the Current Directory at start of the BATch file, but wonder if there is a better way. When in elevated mode I don't get a UAC prompt when using DISKPART. The UAC prompt only happens when running it in a normal command prompt window.

Are you aware of any command which simultaneously would give a different errorlevel when executed in an elevated command prompt than in a normal command prompt, and not produce a UAC prompt in normal mode? If this is the case, unless I can find something to distinguish between elevated command prompts and normal command prompts, then I will have to try the %cd% variable at the start of BATch files, to see whether it is consistent even across user modifications of the command prompt shortcut's Target Directory...

Posted: Oct 16, 2010

View 1 Replies!   View Related
Creating Scheduled Task With .bat File Delayed Execution?
I know how to create scheduled task from .bat file. But if the PC is turned off, i want it to run first time someone logs on. Code: SchTasks /Create /SC MONTHLY /D 15 /TN My Task /TR C:RunMe.bat /ST 14:00 what should i add to this code to make it run if the user opens his pc at 16:00?

Posted: Sep 14, 2012

View 1 Replies!   View Related
Create A .bat File To Disable Wireless When Connect To Wired
I currenly work in an IT department and have given this 'project'.

We have a number of users who have been given 32bit Windows 7 laptops for remote, home and office working.

I have been asked to create a batch file so that as soon as the user comes into the office they plug the laptop into the network and it should use the wired connection automatically to access the corporate LAN. As soon as they work away and need to access the corporate network remotly they do not need to press the wireless button on the laptop, when the laptop is switched and logged on i want the laptop to know that it is not on a wired network and for the wireless to kick in.

I have created two bat files -

netsh interface set interface �Wireless Network Connection� Disable


netsh interface set interface �Wireless Network Connection� Enable

these have been placed in task scheduler under create a basic task. I have tried both of these in cmd prompt but they still don't work.

Posted: Jan 9, 2012

View 3 Replies!   View Related
Write Results From 2 Separate Files To One Log File Via .bat?
I am in need of assistance. I have a batch file that runs nightly to restart machines in a specified list (restartmelist.txt) which works flawlessly. What I am looking to do, is have another file (restartmenames.txt) with a list of usernames, so when I look at the results file, I can not only see the results from each machine, but also whose machine it is. The names correlate in order with the machines. So restartmelist.txt looks like this:


And restartmenames.txt looks like this:

Bob Lastname
Bill Lastname
Jason Lastname

Right now, my log-file writes like this:


What I would like to see, is this:

.Machine1 (Bob Lastname)
.Machine2 (Bill Lastname)
.Machine3 (Jason Lastname)

What I don't know how to do, is call that 2nd file to write the log entries, or if it's even possible. Here is what my code currently looks like:

Code :@ECHO OFFFOR /F "tokens=*" %%A IN ('TIME/T') DO SET Now=%%A>>c:scriptsRestartme.log 2>&1 Echo Restarting of machines STARTED on %date% @ %now%>>c:scriptsRestartme.log 2>&1 Echo.set _=c:scripts
estartmelist.txtfor /f %%i in (%_%) do (>>c:scriptsRestartme.log 2>&1 SHUTDOWN /r /m \%%i /t %1 /c "This machine is forcibly restarting in %1 seconds!" /f>>c:scriptsRestartme.log 2>&1 Echo . %%i)FOR /F "tokens=*" %%B IN ('TIME/T') DO SET NowDone=%%B>>c:scriptsRestartme.log 2>&1 Echo.>>c:scriptsRestartme.log 2>&1 Echo Restarting of machines COMPLETED on %date% @ %nowdone%>>c:scriptsRestartme.log 2>&1 Echo ------------------------------------------------------------------>>c:scriptsRestartme.log 2>&1 Echo.Copy c:scriptsRestartme.log \seaappsappslogfiles /y

Posted: May 31, 2012

View 12 Replies!   View Related
Open Multiple Files One Click - Simple Bat/batch File
I have a simple batch file to load multiple files with one click, but it's not working.

When I run it, it simply very quickly pops up the cmd dialog, which quickly disappears, and nothing is loaded.

I've tried 'running as administrator' - same problem.

File is xxxxx.bat

I've even tried the fail safe:

start /d C:\Windows\System32\calc.exe

and that doesn't work, so it's not a error in my paths... for some reason, it just won't load...

Worked in XP fine...

Is there a different technique in 7?

Basically, end result, want to open two programs with one click (one icon on taskbar).

Posted: Nov 10, 2009

View 1 Replies!   View Related
Programs Won't Run Unless First Right Click And Click Run As Administrator
I'm trying to fix my friends computer and I'm having some issues. There was a nasty virus on it that I managed to get rid of, but now programs won't run unless I first right click and click "Run as Administrator". Shortcuts also won't work (I assume for the same reason.) Does anyone know of a fix for this so we don't have to constantly click "Run as Administrator"? By the way, there is only one user on the computer and it is an administrator.

Posted: Jul 7, 2011

View 2 Replies!   View Related
Run As Administrator - Always
is there a way to tell your computer "listen compy, I am the administrator and everything I click should be taken as 'Run as administrator', got it?"

Just wondering. Any tweaks out there?

Posted: Feb 14, 2009

View 7 Replies!   View Related
How To Run As Administrator
I am being told by my computer that I am not the administrator and that my antivirus I have may not reach everywhere because I am not the administrator. How do I make it so all my programs run as administrator and make me the administrator?

Posted: Mar 26, 2011

View 1 Replies!   View Related
Run As Administrator
How to Run a Program as an Administrator in Windows 7 ?

Posted: Jun 2, 2009

View 0 Replies!   View Related
Copyright 2005-08, All rights reserved