+ Post New Thread
Results 1 to 4 of 4
Scripts Thread, Elevated Command Prompt in Coding and Web Development; I am trying to run a .bat file that clears a log file on a windows 8 laptop each time ...
  1. #1

    Join Date
    Sep 2013
    Posts
    74
    Thank Post
    1
    Thanked 4 Times in 3 Posts
    Rep Power
    3

    Elevated Command Prompt

    I am trying to run a .bat file that clears a log file on a windows 8 laptop each time the user logs on if I have UAC turned off it works fine but then the apps on the Metro screen don' work, but if UAC is turned back on then it wont run due to it not being an elevated cmd prompt.


    Is there a command line I can put at the start of the .bat file which will elevate the prompt so the remainder of the file can run ???

  2. #2

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    Can you not run the batch file as a scheduled task that is triggered at each logon on the laptop, that way you could have it run as an administrator or system and not need to sacrifice security.

  3. #3
    free780's Avatar
    Join Date
    Sep 2012
    Posts
    1,086
    Thank Post
    46
    Thanked 88 Times in 83 Posts
    Rep Power
    23
    If a domain laptop use gpp to remove the file.

  4. #4

    Join Date
    Apr 2013
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Try running this as a scheduled task run with the highest privilege. I believe this should still work on Windows 8 as it does with Windows 7.



SHARE:
+ Post New Thread

Similar Threads

  1. Scripting an Elevated Command Prompt?
    By Garacesh in forum Scripts
    Replies: 11
    Last Post: 13th February 2013, 04:41 PM
  2. Blocking Command Prompt with Group Policy
    By sebbywebby in forum Windows 7
    Replies: 8
    Last Post: 6th December 2010, 03:32 PM
  3. Copying Command prompt to clipboard
    By russdev in forum Windows
    Replies: 10
    Last Post: 21st April 2009, 08:39 AM
  4. Uploading to sharepoint document library via command prompt?
    By BatchFile in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 27th January 2009, 12:13 PM
  5. Prevent Student Access To Command Prompt
    By DaveP in forum How do you do....it?
    Replies: 13
    Last Post: 21st March 2007, 12:37 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •