Skip to content

Access Denied when stop/start services

Featured Replies

Hopefully someone may have a simple answer to, so just in the process of testing our new W10 image so not much experience with this O/S as of yet, I have an application that I install via batch file from a shared drive that stops a service while an application is installed and then restart it when completed, been using this batch file with success for a few years on W7, but on W10 I get Access Denied on both net stop and net start.

 

If I right click and select Run As Administrator it just flashes and disappears if I run from the shared drive, and no it does not process as I have a pause in it to see if it completes

 

If I copy the batch file to the desktop and right click and Run As Administrator it runs successfully

 

Ultimately I want to be able to just double click on the batch file and have it run from the shared drive.

 

What do I need to change to avoid having to copy the batch file and using the Run As Administrator option?

 

 

  • 2 weeks later...

You need to figure out why it is just closing the cmd window. Open a CMD window as admin, then execute the program by typing the full unc path. Doing it this way the cmd window won't close right away and you should be able to diagnose why it didn't run the script. 

Your other option is to open the script itself and copy each command in one after the other into a cmd window and see what it fails on. 

 

Good Luck.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.