Windows 10: .bat file working on one windows 10 computer but not another, just giv

Discus and support .bat file working on one windows 10 computer but not another, just giv in Windows 10 Support to solve the problem; I have a .bat file that works fine when being run on my main pc, but on a laptop that I just did a fresh install of Windows 10 on, it does not work if... Discussion in 'Windows 10 Support' started by cam2363, Mar 25, 2018.

  1. cam2363 Win User

    .bat file working on one windows 10 computer but not another, just giv


    I have a .bat file that works fine when being run on my main pc, but on a laptop that I just did a fresh install of Windows 10 on, it does not work if I type it in and just gives me the error XXX is not a recognized as an internal or external command, operable program, or batch file. But if I double-click on the file itself, it opens as it should, but I need to add more to the command line after it to make it work properly.

    Does anyone know what is causing this, and what I can do to make it run? Is there some software that's missing?

    Thanks!

    :)
     
    cam2363, Mar 25, 2018
    #1

  2. windows 10 don't shutdown

    Hello,

    When running the command I previously commented with, you said it didnt work. By this do you mean that it isnt properly shutting down? as that command should shutdown any running apps and then the device.

    Another idea is similar to Dorzguys suggestion, which is to disable the fast boot/hibernate settings of the laptop. he has provided a link for the windows 8 walkthrough, but here is one for windows 10:

    Turn On or Off Fast Startup in Windows 10

    The option i would chose is to use the .bat file, as this will take care of the registry file without you needing to edit anything. The bat file contains one main command, which is:

    REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /V HiberbootEnabled /T REG_dWORD /D 0 /F

    Using this bat file (or just running that command as administrator) should disable the hibernate function, which will disable the fast boot. Hopefully this should allow for your laptop to properly power off.

    Kind regards,

    Fergus
     
    Fergus Martin, Mar 25, 2018
    #2
  3. Zahav Win User
    Cant open ANY Bat file

    Hello,

    It does not matter what function the bat file has, what it's for and what is the address written in. Upon launch, it will give an error: "Windows cannot get access the specified path or file. You may not have the appropriate permissions to access this item".
    Launching as admin will not help, it will go blank or give another error. So no bat file will ever launch a software. Workaround for me its bat to exe converter, but it does not work in all cases.

    I have only the windows defender working. Looked all over, tried tweaks found on the net. Nothing won't work. There is a setting somewhere that blocks cmd for accessing the files using bat files. Would be grateful for the useful help.
     
    Zahav, Mar 25, 2018
    #3
  4. .bat file working on one windows 10 computer but not another, just giv

    What is the file named and where is it located?
     
    PolarNettles, Mar 25, 2018
    #4
  5. Samuria Win User
    Open a cmd prompt then type

    set

    the folders for path the file must be in one of those in order to be found and run if not you will have to give a full path to it
     
    Samuria, Mar 25, 2018
    #5
  6. cam2363 Win User
    its called download_all.bat its located in a folder on the desktop
     
    cam2363, Mar 25, 2018
    #6
  7. cam2363 Win User
    How do I add it into there?
     
    cam2363, Mar 25, 2018
    #7
  8. Samuria Win User

    .bat file working on one windows 10 computer but not another, just giv

    just enter full path to run ie C:\Users\user\Desktop\download_all.bat
     
    Samuria, Mar 25, 2018
    #8
  9. cam2363 Win User
    Same error. Did just as you said
     
    cam2363, Mar 25, 2018
    #9
  10. PolarNettles, Mar 25, 2018
    #10
  11. Bree New Member
    If you copied that command exactly as samuria wrote it and your name is not 'User' then it wouldn't work. Instead, try...
    %userprofile%\Desktop\download_all.bat
    ...which should work whatever account name you have.
     
  12. cam2363 Win User
    Ill try that, I did make it say my account name, so i dont think your idea is going to work, but ill give it a shot.
     
    cam2363, Mar 25, 2018
    #12
  13. cam2363 Win User

    .bat file working on one windows 10 computer but not another, just giv

    cam2363, Mar 25, 2018
    #13
  14. Bree New Member
    What version of Windows do you have? Controlled Folder Access was introduced in version 1709, the Fall Creators Update.
     
  15. First of all create and execute below batch script to make sure Path environment variable is not corrupted if the batch script execute then there is a problem with your batch script and for us to help you resolve this issue we need to see your batch script codes.


    Code: @Echo Off & Cls Ping LocalHost Pause Exit[/quote]
     
    FreeBooter, Mar 26, 2018
    #15
Thema:

.bat file working on one windows 10 computer but not another, just giv

Loading...
  1. .bat file working on one windows 10 computer but not another, just giv - Similar Threads - bat file working

  2. How in Windows 11 mount in 15 seconds with just one command line .bat file or another...

    in Windows 10 Gaming
    How in Windows 11 mount in 15 seconds with just one command line .bat file or another...: How in Windows 11 mount in 15 seconds with just one command line .bat file or another script Encrypted with LUKS VHD Disk? https://answers.microsoft.com/en-us/windows/forum/all/how-in-windows-11-mount-in-15-seconds-with-just/69c3ceee-d0f7-4048-8a15-26c313bcf015
  3. How in Windows 11 mount in 15 seconds with just one command line .bat file or another...

    in Windows 10 Software and Apps
    How in Windows 11 mount in 15 seconds with just one command line .bat file or another...: How in Windows 11 mount in 15 seconds with just one command line .bat file or another script Encrypted with LUKS VHD Disk? https://answers.microsoft.com/en-us/windows/forum/all/how-in-windows-11-mount-in-15-seconds-with-just/69c3ceee-d0f7-4048-8a15-26c313bcf015
  4. Reinstalling Windows 10 on one device from one disc to another with just one slot

    in Windows 10 Installation and Upgrade
    Reinstalling Windows 10 on one device from one disc to another with just one slot: Good day.I have question. I want to upgrade my HDD to SSD on old acer notebook but i have just one slot for disc. How to proprerly do it? Just switching discs and use bootable USB stick with instalation or using "settings>recovery>factory reset" and connecting new SSD by USB...
  5. Move files from one drive to another not just duplicate

    in Windows 10 Gaming
    Move files from one drive to another not just duplicate: Hello!I have it set up so my downloads folder and desktop folder are in different drives so when I download something and move it by dragging it to my desktop then it creates a replica of it to my desktop leaving the original one to the downloads folder. Yes, I am aware of...
  6. Move files from one drive to another not just duplicate

    in Windows 10 Software and Apps
    Move files from one drive to another not just duplicate: Hello!I have it set up so my downloads folder and desktop folder are in different drives so when I download something and move it by dragging it to my desktop then it creates a replica of it to my desktop leaving the original one to the downloads folder. Yes, I am aware of...
  7. Move files from one drive to another not just duplicate

    in Windows 10 Customization
    Move files from one drive to another not just duplicate: Hello!I have it set up so my downloads folder and desktop folder are in different drives so when I download something and move it by dragging it to my desktop then it creates a replica of it to my desktop leaving the original one to the downloads folder. Yes, I am aware of...
  8. Copying files from one computer to another.

    in Windows 10 Drivers and Hardware
    Copying files from one computer to another.: I have several NTFS formatted portable HDDs that when new files are copied onto them from one machine and I attempt to read them on another machine the new files don't appear. I've tried to use chkdsk in command mode with the /f switch, but that will not run because I'm...
  9. I'm working on one desktop, Windows 10 opens a file on another

    in Windows 10 Customization
    I'm working on one desktop, Windows 10 opens a file on another: My first experiment with multiple desktops began well. I had a half dozen windows open on desktop 1 for one task, and simultaneously a half dozen windows on desktop 2 for another task. Then I tried to open a text file on desktop 1 when several were already open on desktop 2....
  10. how to work on a file from one computer to another

    in Windows 10 Network and Sharing
    how to work on a file from one computer to another: How do I work on the same files on two computers https://answers.microsoft.com/en-us/windows/forum/all/how-to-work-on-a-file-from-one-computer-to-another/78eb4d25-b8d4-4fad-9293-6cac4c5c8797