Windows 10: How to run batch file as administrator in any PC (Tell me Script)

Discus and support How to run batch file as administrator in any PC (Tell me Script) in Windows 10 Network and Sharing to solve the problem; How to run batch file as administrator in any PC (Tell me Script), No Registry, Settings etc.... Discussion in 'Windows 10 Network and Sharing' started by stien77, Sep 16, 2019.

  1. stien77 Win User

    How to run batch file as administrator in any PC (Tell me Script)


    How to run batch file as administrator in any PC (Tell me Script), No Registry, Settings etc.

    :)
     
    stien77, Sep 16, 2019
    #1
  2. DanTov Win User

    need to run a cmd command as administrator within batch file

    Couldn't i add the credentials into the batch file so it already has the info it needs. I want to be able to run a script on a pc and no matter who is logged in it will run. but the script needs to be as administrator.
     
    DanTov, Sep 16, 2019
    #2
  3. 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, Sep 16, 2019
    #3
  4. How to run batch file as administrator in any PC (Tell me Script)

    FreeBooter, Sep 16, 2019
    #4
Thema:

How to run batch file as administrator in any PC (Tell me Script)

Loading...
  1. How to run batch file as administrator in any PC (Tell me Script) - Similar Threads - run batch file

  2. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  3. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  4. How to undo a batch script

    in Windows 10 Network and Sharing
    How to undo a batch script: I decided it would be a good idea to download and run a random batch script from the internet to get the ability to move files around freely, rather than sticking to the presets. Microsoft, if you see this, please allow us to move and organize files as we wish and not have to...
  5. Syntax for Batch file &/or powershell script to run multiple commands

    in Windows 10 Support
    Syntax for Batch file &/or powershell script to run multiple commands: I wanted a batch file to run the following commands: Start Powershell as administrator cd "C:\Program Files\Macrium\Reflect" regsvr32 RContextMenu.dll regsvr32 RShellEx.dll I can get as far as: Code: echo Start "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" cd...
  6. How to run Batch file as Administrator without prompt in Windows 10

    in Windows 10 News
    How to run Batch file as Administrator without prompt in Windows 10: [ATTACH] [ATTACH]You can execute a number of tasks on your Windows computer by running commands. These commands work great. Some people also try to execute a number of these commands one by one. This bulk execution of commands helps them get [...] This post How to run Batch...
  7. Automatically Run Batch Script

    in Windows 10 Installation and Upgrade
    Automatically Run Batch Script: Hi everyone When the windows installation is finished, automatically run batch script. How can I do that? Thanks *Wink 122531
  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. How to tell if a program is running 'As administrator'

    in Windows 10 Software and Apps
    How to tell if a program is running 'As administrator': When an application is open, is there some way to tell if it's being run 'As Administrator'? Terry, East Grinstead, UK 89905
  10. Any good Batch file renaming software / scripts

    in Windows 10 Support
    Any good Batch file renaming software / scripts: Hi there does anybody have any decent batch file renaming software or scripts. Here's a whole slew of music files from BBC Radio 3 -- what I want is after the word Breakfast in the title to insert date and time (european format YYMMDD.HHMM -24 hr format. Here's what...