"Run As Administrator" in Win7

Discussion in 'Software' started by dlb, Nov 20, 2010.

  1. dlb

    dlb MajorGeek

    I created a little .BAT file for re-syncing the time/date, and put a shortcut to it on my desktop. However, it only works if I right click and select "Run As Administrator". If I right click, select "Properties", then click the "Compatibility" tab, the check box for "Run As Administrator" is greyed out, so I can't permanently set it... is there a way around this? My big plan is to add the .BAT file to the Windows task scheduler so that it will run once every hour, but since I can't seem to set it to "run as admin", I have to launch it manually. Any thoughts or input will be appreciated.
    ;)
     
  2. Mimsy

    Mimsy Superior Imperial Queen of the MG Games Forum

    If you boot in Safe Mode you can get into the account "Administrator", you might be able to add the file and configure it from there. Worth a shot at least.
     
  3. dlb

    dlb MajorGeek

    Good idea! I don't reboot often (yeah - I know - bad idea) but when I do tomorrow, I'll give it a go and report the results.... however.... if any other ideas are floating around out there in MG land, feel free to post 'em!
     
  4. Earthling

    Earthling Interplanetary Geek

    Can't help with the batch file but another way to do this would be with a macro recorder such as AutoHotkey. You create a script by recording your mouse clicks and key strokes, convert it to an exe, and add it to Task Scheduler. It's very easy to use though oddly I've never actually found any use for it :-o
     
  5. dlb

    dlb MajorGeek

    Interesting.... verrrry interesting.... ** dlb scratches his chin **.... never heard of this, but sounds good enough. I'll check it out. Thanks.
     
  6. dlb

    dlb MajorGeek

    Just for the hell of it, I decided to add my BAT to the Task Scheduler anyway with the hope that when creating a new task, an option would be available to run the task as an administrator. Well, there was no exact setting, but there is a check box for "Run with highest privileges" which I interpret as "Run as administrator". So, hopefully this will work. I'll know in about an hour....

    ** dlb crosses his fingers **
     
  7. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

  8. dlb

    dlb MajorGeek

    Thanks for the input BB, but it seems that my stab at using the Task Scheduler worked perfectly! The only reason I wanted to do this is because my Windows clock would sometimes be off by 2 minutes every so often. Why? I don't know. Someone told me that my mobo was bad, but the clock problem didn't start until I installed Win7X64; it was a clean install, from a previous WinXP Pro install. All the hardware is the same and I never had the 2min problem when running XP. I tested the CMOS battery and it was fine (at 3.05v) but I replaced it anyway, but this had no effect. Halo provided a reg-hack a few months ago, but for some reason it didn't work all the time. It worked about 75% of the time, reducing my 2min problem to occurring maybe once every 4-5 weeks, instead of once every 10-20 days before the reg-hack, but it still happens. Now that I have added the BAT to the Task Scheduler and am running it with high privileges, the problem (so far) has vanished. For those interested, the .BAT file is a simple one-liner:
    Code:
    [b]w32tm.exe /resync[/b]
    That's it! I saved it as a .BAT to root C: and then added it to the Task Scheduler with highest privileges...
     

    Attached Files:

    Last edited: Nov 21, 2010
  9. dlb

    dlb MajorGeek

    Hey Bazza - I followed the first link your provided, and the last post in that thread was very informative....
    That works great for the desktop shortcut I have to my time-sync batch file, just in case I want to update the time/date manually. THANKS!
     
  10. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    You're very welcome, dlb. :major

    Glad to help.:-D

    Bazza
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds