Windows 8 and 8.1 Forums


Batch script -> Access Denied to C:\Windows\

  1. #1


    Posts : 21
    Windows 8 Pro x64

    Batch script -> Access Denied to C:\Windows\


    Running the following batch script:
    Code:
    @regedit /s registry.reg
    @copy rundll32.exe C:\Windows\
    @copy shimgvw.dll C:\Windows\
    @echo Done.
    @pause
    I am left with the following:
    Click image for larger version
    This is new to Windows 8. Why is this happening?

      My System SpecsSystem Spec

  2. #2


    Posts : 534
    Windows 7, Windows 8 RP


    According to your screenshot you are running command window as a regular user, do you get the same access denied when running it as administrator?
      My System SpecsSystem Spec

  3. #3


    Posts : 21
    Windows 8 Pro x64


    Quote Originally Posted by R0bR View Post
    According to your screenshot you are running command window as a regular user, do you get the same access denied when running it as administrator?
    I can't seem to run batch files as Admin. They don't even launch. I tried with a blank one and it didn't even launch.
    UAC is disabled on my system though and my account is an administrator.

    *edit: The batch file mentioned in this thread exhibits this behavior. I am able to run a blank one after all.
    Last edited by LuzTeTT; 28 Oct 2012 at 22:15.
      My System SpecsSystem Spec


  4. #4



    Posts : 1,925
    Windows 8.1 Pro


    When you say UAC is disabled, do you mean you turned the slider down? Because that doesn't actually disable UAC, it just auto-approves all the popups so they happen silently.

    Disabling UAC in Windows 8 will cause a number of problems, particularly with Metro apps.

    What is it exactly you are trying to do?
      My System SpecsSystem Spec

  5. #5


    Posts : 21
    Windows 8 Pro x64


    Quote Originally Posted by Mystere View Post
    What is it exactly you are trying to do?
    Just execute the above mentioned batch file.

    No, I have only turned UAC down. I haven't disabled any services or anything.
      My System SpecsSystem Spec

  6. #6



    Posts : 1,925
    Windows 8.1 Pro


    I have no problems executing a batch file by right clicking on it and choosing "Run as Administrator". Batch file

    I created a new text file on my desktop, added a single line "pause" to it, then renamed the extension to .bat (also works with .cmd) and right clicked on it and chose Run as Administrator. Worked fine.
      My System SpecsSystem Spec

  7. #7


    Posts : 21
    Windows 8 Pro x64


    To reiterate...

    I am unable to run this specific batch file. When I attempt it, I am left with "Access is denied..." to C:\Windows\.
    If I attempt to run it elevated or under the Administrator credentials, by right clicking it, it doesn't do anything at all.

    The batch script is fairly simple, shown in the first post of this thread.
      My System SpecsSystem Spec

  8. #8



    Posts : 1,925
    Windows 8.1 Pro


    And to reiterate. I have no problems doing such. That means whatever the problem is, it's not a Windows 8 problem.
      My System SpecsSystem Spec

  9. #9


    Posts : 129
    Win7-8 Dual Boot on a Commodore 64

    cmd-Administrator


    This batch file is a bit more complex than yours,
    but it ran perfectly on Win 7 and it runs fine in Win 8.


    But again, assure you are running cmd as Administrator.

    Click image for larger version


    Also, your Win 8 Login Account should be set to Administrator.

    Click image for larger version



    It just cleans EVERY Event Log file know to man...so be sure you WANT that
    to actually happen before you run it!!!

    @echo off
    FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
    IF (%adminTest%)==(Access) goto noAdmin
    for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    echo.
    echo Event Logs have been cleared! ^<press any key^>
    goto theEnd
    :do_clear
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    :noAdmin
    echo You must run this script as an Administrator!
    echo ^<press any key^>
    :theEnd
    pause>NUL


    I'm gonna make a batch of cookies myself :)

    Cheers
    Windunce
      My System SpecsSystem Spec

  10. #10


    Posts : 21
    Windows 8 Pro x64


    Thank you for your declarations. I am using a fresh install of Windows 8.

    Please read the initial post.
      My System SpecsSystem Spec

Page 1 of 4 123 ... LastLast
Batch script -> Access Denied to C:\Windows\

Similar Threads
Thread Forum
Windows font folder - access is denied
Hello guys. I'm facing some problems trying to instal new fonts on my Windows 8.1. I downloaded the font, but when i click instal on it, a dialog window appears saying : Windows font folder - access is denied. I also tried copying the font, to the Fonts folder at control panel, but i recieve the...
General Support
Windows Firewall and BFE cannot be started, access denied
Hello, Following a recent Windows Update, Windows Firewall on my Windows 8 system was disabled. Upon attempting to start the firewall through the services.msc dialog, I receive an error code 1068, informing that the dependency service or group failed to start. After doing some googling to...
System Security
Problem with string comparison in batch script
Greetings I am attempting to write a batch script that uses a program called Mailsend to send an email. The script then examines Mailsend's log output to determine if the email was successfully sent. This is what I have so far: mailsend1.17b14.exe -to <snip personal info> -log temp.txt...
General Support
Windows 8 hard drive access denied
Hi, I have the same issue. System stopped booting, HDD - "Access Denied" when I'm trying to transfer data on other computers. Tried taking the ownership, still nothing has changed. I've followed a suggestion on one of the Forums to boot from Windows 7 bootable disk. Te result - "Wrong...
General Support
I'm denied access to my own files in Windows 8...HELP!!!
Hi All! I'm relatively new here and I have a very annoying problem with my new laptop that, (unfortunately), runs the despicable OS, Windows Hate....oops, I mean '8'. I'm the ONLY user, the owner AND Administrator of my laptop, but I'm denied access to my own files!! I'm only a casual user,...
Network & Sharing
Help: Destination Folder Access Denied - Windows 8
Hey guys, I'm new to forum posting so bare with me. We just purchased a new office computer and it came equipped with windows 8. Everything seemed to set up wonderfully as I connected back up to the server we have here in the office that is running Windows 2008 Server. I set up my printers, I...
Network & Sharing
Access Denied ...Permission Denied
Since installing Windows 8, I have been having sporadic problems with access denied. Examples follow: PIMEX is a Personal Information Manager that I have been using through several generations of Windows. When I first converted to Windows 8, this program worked with no problems. Now, however,...
Network & Sharing

Eight Forums Android App Eight Forums IOS App Follow us on Facebook