Jump to content


  • 0
Jasper

Access Denied when stop/start services

Question

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?

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.