Windows 10: Running batch file has wrecked my pc.

Discus and support Running batch file has wrecked my pc. in Windows 10 Performance & Maintenance to solve the problem; I was trying to create a sleep button shortcut on my desktop. To do this, I followed a forum of someone trying to create the same shortcut. I created a... Discussion in 'Windows 10 Performance & Maintenance' started by KeZPlayZGaming7, Mar 3, 2023.

  1. Running batch file has wrecked my pc.


    I was trying to create a sleep button shortcut on my desktop. To do this, I followed a forum of someone trying to create the same shortcut. I created a notepad and copy and pasted the powercfg codeRunning batch file has wrecked my pc. :powercfg -h offrundll32.exe powrproof.dll,SetSuspendState 0,1,0powercfg -h onand saved it, but i then clicked on the program on accident and turns out i wasnt meant to, i was meant to create the shortcut on the desktop not click on the notepad .bat file. Now my pc wont go to windows or to bios, its stuck on one screen which is the motherboard logo screen. Please help, I just recently bought this mot

    :)
     
    KeZPlayZGaming7, Mar 3, 2023
    #1
  2. oily_17 Win User

    Batch Files Knowledge Base

    Don't use batch files very much but one I find useful is for creating a list of files in a directory.
    Just copy the text below into Notepad and save as Filelist.bat

    dir /a /-p /o:gen >filelist.txt

    When you run it from a folder it will create a Filelist.txt file,in the same folder, that lists all the files in that folder.Useful when you are too lazy to type all the files out yourself.
     
    oily_17, Mar 3, 2023
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Mar 3, 2023
    #3
  4. Running batch file has wrecked my pc.

    Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Mar 3, 2023
    #4
Thema:

Running batch file has wrecked my pc.

Loading...
  1. Running batch file has wrecked my pc. - Similar Threads - Running batch file

  2. Cant run Batch file

    in Windows 10 Gaming
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  3. Cant run Batch file

    in Windows 10 Software and Apps
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  4. Running batch file has wrecked my pc.

    in Windows 10 Gaming
    Running batch file has wrecked my pc.: I was trying to create a sleep button shortcut on my desktop. To do this, I followed a forum of someone trying to create the same shortcut. I created a notepad and copy and pasted the powercfg code:powercfg -h offrundll32.exe powrproof.dll,SetSuspendState 0,1,0powercfg -h...
  5. Running batch file has wrecked my pc.

    in Windows 10 Software and Apps
    Running batch file has wrecked my pc.: I was trying to create a sleep button shortcut on my desktop. To do this, I followed a forum of someone trying to create the same shortcut. I created a notepad and copy and pasted the powercfg code:powercfg -h offrundll32.exe powrproof.dll,SetSuspendState 0,1,0powercfg -h...
  6. Batch File run but GUI not prompt

    in Windows 10 Gaming
    Batch File run but GUI not prompt: Hello,I made an batch file to run exe file but GUI prompt not appear if i tried to run from outside i.e. batch file present on ABC Folder and I am going to command prompt and run the same it's running and GUI Interface shows but when I runneed the file from other directory...
  7. Batch File run but GUI not prompt

    in Windows 10 Software and Apps
    Batch File run but GUI not prompt: Hello,I made an batch file to run exe file but GUI prompt not appear if i tried to run from outside i.e. batch file present on ABC Folder and I am going to command prompt and run the same it's running and GUI Interface shows but when I runneed the file from other directory...
  8. Running PowerShell script as a batch file

    in Windows 10 Network and Sharing
    Running PowerShell script as a batch file: Can I run the Power Shell line: "C:\Windows\System32>get-appxpackage *3dbuilder* | remove-appxpackage" from a .Bat file? ***Original title: Removing bloatware***...
  9. Run oscdimg.exe from a batch file?

    in Windows 10 Installation and Upgrade
    Run oscdimg.exe from a batch file?: OK, I have a batch file that copies files from a mounted windows 10 installation file and updates drivers in boot.wim and install.wim. The thing I cannot work out is how to automatically run oscdimg.exe (command from deployment and imaging environment) in a batch file so I...
  10. Running an uneditable Batch file

    in AntiVirus, Firewalls and System Security
    Running an uneditable Batch file: Hi people, Got a task to run a certain CMD command on a number of PCs as administrator. So I thought i would create a batch file doing this. This is not the issue. The issue is that I am unable to lock down successfully so people cannot just edit the file to see the admin...