Quake3World.com Forums
     General Discussion
        Batch - open with notepad + administrator


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Previous topic | Next topic 
Topic Starter Topic: Batch - open with notepad + administrator

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 03-21-2012 07:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

4days Joined: 15 Apr 2002
Posts: 8193
PostPosted: 03-21-2012 10:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

god xor reason
god xor reason
Joined: 08 Dec 1999
Posts: 21100
PostPosted: 03-21-2012 10:40 AM           Profile   Send private message  E-mail  Edit post Reply with quote


You can't just do this and run it as admin?

Code:
notepad /path.to/a.txt
notepad /path/to/this/b.txt
notepad /omg/wtf/bbq.txt


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.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 03-21-2012 11:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


Oh, that works bitWISE. Thanks guys.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Arrr?
Arrr?
Joined: 09 Feb 2001
Posts: 35461
PostPosted: 03-21-2012 12:52 PM           Profile Send private message  E-mail  Edit post Reply with quote


notepad++ is awesome like that. :up:



_________________
YourGrandpa wrote:
I'm satisfied with voicing my opinion and moving on.


Top
                 
Quake3World.com | Forum Index | General Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.