1.    31 Jul 2017 #1
    Join Date : Feb 2015
    Posts : 225
    Windows 10 Enterprise LTSB

    I can no longer run bat file as Admin (cmd flickers then closes)


    I made a working script for my windows to mount and unmount drives and it works but it requires admin permission. right after i made the script i saved it and test it and it was working fine, i tested it about 15 times and it works.
    then i reboot and the script no longer runs as admin anymore if i run int without admin it works but cant carry out the command due to lack of permission and if i try to run as admin the cmd window flickers for a split second and closes. the script is indeed correct and working because if run the bat through the task manager as admin that works just fine. how is this even possible?
      My ComputerSystem Spec
  2.    01 Aug 2017 #2
    Join Date : Oct 2016
    Caledon, Ontario, Canada
    Posts : 4,117
    Windows 10 Pro Build 1703

    Hi xdarkmario

    Have a read of this thread. Maybe, just maybe it will help.

    bat job started by Task Scheduler does not pause


    Ken
      My ComputerSystem Spec
  3.    01 Aug 2017 #3
    Join Date : Oct 2014
    Trnava
    Posts : 2,871
    Windows 10.4 Home 1709 x64

    Try this: Create shortcut of the bat and set the shortcut to run as admin.
      My ComputerSystem Spec
  4.    01 Aug 2017 #4
    Join Date : Feb 2015
    Posts : 225
    Windows 10 Enterprise LTSB
    Thread Starter

    Quote Originally Posted by Caledon Ken View Post
    Hi xdarkmario

    Have a read of this thread. Maybe, just maybe it will help.

    bat job started by Task Scheduler does not pause


    Ken
    it took me all day to learn how to wright that batch file yet alone learn how to learn powerscript, thats a whole other level
    Quote Originally Posted by TairikuOkami View Post
    Try this: Create shortcut of the bat and set the shortcut to run as admin.
    Already tried that and it does not work
      My ComputerSystem Spec
  5.    01 Aug 2017 #5
    Join Date : Apr 2015
    Posts : 271
    Windows 10 Home x64 and Pro x86

    Are your tests before & after reboot using the exact same conditions? - e.g. both being initiated using a shortcut / both being initiated by Task scheduler / both being initiated by a command entered in an elevated command prompt / both being run by the same user account & the same authorising Admin account

    Denis
      My ComputerSystem Spec
  6.    01 Aug 2017 #6
    Join Date : Feb 2015
    Posts : 225
    Windows 10 Enterprise LTSB
    Thread Starter

    found the issue, it dosent seem to like "&" in the file name. After removing the "&" the script works again.
    Last edited by xdarkmario; 01 Aug 2017 at 23:15.
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
No longer admin and error when I try to delete a certain program
I tried to delete something. I can't remember what it was but the computer wouldn't let me. I don't know how to check if I have admoin control but I have only one account on my system. When I try to delete finally fantasy xiv I get this error...
General Support
Winrar activated as admin but when you log out to user it is no longer
Winrar activated as admin but when you log out to user it is no longer activated in windows 10 this Windows 10 is a real pain in the ass. Can anyone help it is really annoying please, I have tried everything in the book, as admin my key shows as...
Software and Apps
Screen flickers & then explorer closes
On a Dell Vostro 3550 laptop, there were a few issues with Windows 7, so I erased the drive, did a fresh install of Windows 7 Pro, downloaded and installed all of the drivers from Dell. Then did a Windows 10 upgrade. When Windows 10 would first...
Installation and Upgrade
File Explorer closes then reopen
for the last few days, the explorer closes and reopen itself immediately. this happens both on my Home PC and Work PC. anybody experiencing this too? see screenshot: Explorer opening twice (when locating a file) (from reddit)
General Support
Desktop flickers when i click on start menu for longer
Hey, after been using Windows 10 since launch I've got annoyed by those silly things whenever I click start menu for longer than like 2 or 3 minutes. When it happens, the windows desktop flickers to black. I uninstalled the drivers and used the...
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:55.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums