Windows 8 and 8.1 Forums


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

  1. #21


    Posts : 301
    Windows 8 Pro


    Got another question to this: I have a .bat file I am trying to run from a hyperlink. I have a shortcut to the .bat file with "Administrator" checked and the .bat file runs fine from the shortcut, but still looks for privileges when run from the hyperlink. I do no want to use "runas" because it "requires" a password and there may not be one.

      My System SpecsSystem Spec

  2. #22


    Posts : 1,925
    Windows 8.1 Pro


    Batch files do not, by themselves, require any special privileges. It's what the batch file does that requires them. Without knowing what it does, we have no idea what the problem is.
      My System SpecsSystem Spec

  3. #23


    Posts : 301
    Windows 8 Pro


    Here is the .bat file:

    powercfg /Hibernate on
    C:\Windows\System32\Rundll32.exe powrprof.dll,SetSuspendState Hibernate
      My System SpecsSystem Spec

  4. #24


    Posts : 1,925
    Windows 8.1 Pro


    Ok, you're enabling the hibernation file. This requires administrator privileges. I do not know what you mean by "run from the hyperlink", but you cannot run this command without having administrator privileges.
      My System SpecsSystem Spec

  5. #25


    Posts : 301
    Windows 8 Pro


    Quote Originally Posted by Mystere View Post
    Ok, you're enabling the hibernation file. This requires administrator privileges. I do not know what you mean by "run from the hyperlink", but you cannot run this command without having administrator privileges.
    <a href="../core/Hibernate.bat.lnk"><img src="../img/Hibernate.png" border="0" width="20" height="20" alt="Hibernate"></a>
      My System SpecsSystem Spec

  6. #26


    Posts : 1,925
    Windows 8.1 Pro


    I don't really understand what you're doing. That's a web page. Are you trying to run the batch file on the local computer or on the web server?

    Assuming you want local, this will download the lnk file, which points to a location that is valid on the server. It's unlikely the client has a batch file in that same location with the same name.

    IE runs in protected mode, which prevents it from executing anything that requires administrator privileges. The "Administrator" checkbox is metadata, and is only valid on the computer it was created on.
      My System SpecsSystem Spec

  7. #27


    Posts : 301
    Windows 8 Pro


    Not a webpage, it is a desktop gadget that controls sleep and hibernate modes. Hibernate has to be enabled (on) for "Hibernate" and disabled (off) for "Sleep". The hyperlink opens the shortcut that has "Administrator" checked, that opens the batch file with the command in it. Double clicking the shortcut runs fine, it is the hyperlink that fails.
      My System SpecsSystem Spec

  8. #28


    Posts : 1,925
    Windows 8.1 Pro


    Windows 8 doesn't have gadgets.
      My System SpecsSystem Spec

  9. #29


    Posts : 301
    Windows 8 Pro


    Quote Originally Posted by Mystere View Post
    Windows 8 doesn't have gadgets.
    Not as native, but can be added: 8GadgetPack - Gadgets for Windows 8
      My System SpecsSystem Spec

  10. #30


    Posts : 1,925
    Windows 8.1 Pro


    So maybe you should talk to the author of that then. Or on the Windows 7 support boards. Windows 8 removed Gadgets due to security issues, and you're probably dealing with such issues.
      My System SpecsSystem Spec

Page 3 of 4 FirstFirst 1234 LastLast
Batch script -> Access Denied to C:\Windows\
Related Threads
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...
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...
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...
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...
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,...
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...
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,...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook