Windows 10: Running an uneditable Batch file

Discus and support Running an uneditable Batch file in AntiVirus, Firewalls and System Security to solve the problem; 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... Discussion in 'AntiVirus, Firewalls and System Security' started by DanTov, Jul 16, 2018.

  1. DanTov Win User

    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 credentials. One of my colleges i have been testing this with is able to take ownership of the file and then he can do whatever he likes.

    For context: the file is in a shared folder on my pc

    it is shared with everyone but only with read permssions

    security permissions for everyone is only traverse folder /execute and i have full control

    security share permissions are set for everyone to read, and administrators of my PC have full control.

    he is not an administrator on my pc.

    Windows 10


    Am I doing this right?

    Any help would be appreciated!

    Dan

    :)
     
    DanTov, Jul 16, 2018
    #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, Jul 16, 2018
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Jul 16, 2018
    #3
  4. Running an uneditable Batch file

    Running Batch Files

    I have a small batch file that I run frequently.

    When I run it, I get informed that the Publisher could not be verified.

    What is this all about and how do I stop it?
     
    CharlieOrton, Jul 16, 2018
    #4
Thema:

Running an uneditable Batch file

Loading...
  1. Running an uneditable Batch file - Similar Threads - Running uneditable Batch

  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. 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...
  5. 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...
  6. run batch file step by step

    in Windows 10 Customization
    run batch file step by step: Hi to all I need your help and support, I'm a Test Engineer and I dedicate and maintain to develop and improve batch files, and I need to know if somebody knows, how to run a batch file step by step in windows 10 or windows server?. Previously in ms-dos i use the next line...
  7. 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***...
  8. 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...
  9. How to run batch file with powershell

    in Windows 10 Network and Sharing
    How to run batch file with powershell: I created a basic batch file that uses "net share" to share a local path. I saved the batch file. When I double click the file I get "access is denied"... note, I am logged on as a admin. Anyways... I figure it has to be run using power shell. I do not know much about...
  10. Unable to run batch file at startup

    in Windows 10 Support
    Unable to run batch file at startup: I am trying to run a batch file with these contents: Code: ECHO OFF TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /internal TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /external[/quote] I've tried putting a shortcut to it in the startup folder, putting the bat itself in the startup...