I'm wondering if anyone knows how to execute a Windows batch file or other script that can open a configuration file in a text editor as an administrator.
I have a bunch of config files that need to be edited on a normal basis that are hidden deep in a bunch of subfolders protected from normal user access. It's really annoying running the text editor as administrator and then manually browsing through a dozon subfolders.
Thanks.
Batch - open with notepad + administrator
Batch - open with notepad + administrator
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Batch - open with notepad + administrator
in a bit of a rush so don't have time to properly check/test any of this, but could you do something in the registry based on the file extension?
http://www.howtogeek.com/howto/windows- ... ows-vista/
..or put a shortcut in your shortcut - create a shortcut to the editor of your choice, then edit the shortcut properties to set the compatibility settings to always open as admin - then right-click on the type of file (again, this relies on the extension) and go to open with,.. choose the shortcut you just created rather than the editor itself. from then on i think it should automatically ask if you want to run as admin when you try to open one of those files. that may be bollocks, i just tested it by making a shortcut and then typing "start <shortcut name> <document path>" for notepad++ and it seemed to work fine.
http://www.howtogeek.com/howto/windows- ... ows-vista/
..or put a shortcut in your shortcut - create a shortcut to the editor of your choice, then edit the shortcut properties to set the compatibility settings to always open as admin - then right-click on the type of file (again, this relies on the extension) and go to open with,.. choose the shortcut you just created rather than the editor itself. from then on i think it should automatically ask if you want to run as admin when you try to open one of those files. that may be bollocks, i just tested it by making a shortcut and then typing "start <shortcut name> <document path>" for notepad++ and it seemed to work fine.
Re: Batch - open with notepad + administrator
You can't just do this and run it as admin?
Also, if you have the option to install notepad++, it remembers the files you leave open so you could just launch it as admin and not close the child windows.
Code: Select all
notepad /path.to/a.txt
notepad /path/to/this/b.txt
notepad /omg/wtf/bbq.txtRe: Batch - open with notepad + administrator
Oh, that works bitWISE. Thanks guys.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Batch - open with notepad + administrator
notepad++ is awesome like that. 
[quote="YourGrandpa"]I'm satisfied with voicing my opinion and moving on.[/quote]