Jump to content


Did the ability to edit .config files for the Admin go away with Win7?


  • Please log in to reply
10 replies to this topic

#1 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,591 posts

Posted 24 July 2012 - 11:30 AM

Greetings all,
Hope everyone is doing well.  Had a question I can't seem to get a clear answer on.  In the Windows XP environment, as administrator, I would need to manually edit the machine.config file within /WINDOWS/Microsoft.NET/Framework/V2.0.50727 for a web based software to work under a very strict environment.  This environment will soon be moving to Windows 7 64 bit Enterprise N.  In doing testing, I discovered even "Running as administrator" that I only have "read and execute" permissions for .config files.  Did the ability to edit .config files with admin privalages go away with Windows 7?  If so, is there a work around way that works?

Thanks all,

Ian
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
Arch Linux Environment Setup How-To Learn how to not only install Arch Linux but learn more about the inner workings of Linux
"I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what i meant."
- Robert McCloskey
Registered Linux User:  526317 10/22/2010
Posted Image  Posted Image  Posted Image Posted Image

#2 OFFLINE   Tushman

Tushman

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,799 posts

Posted 24 July 2012 - 01:13 PM

View Postichase, on 24 July 2012 - 11:30 AM, said:

Greetings all,
Hope everyone is doing well.  Had a question I can't seem to get a clear answer on.  In the Windows XP environment, as administrator, I would need to manually edit the machine.config file within /WINDOWS/Microsoft.NET/Framework/V2.0.50727 for a web based software to work under a very strict environment.  This environment will soon be moving to Windows 7 64 bit Enterprise N.  In doing testing, I discovered even "Running as administrator" that I only have "read and execute" permissions for .config files.  Did the ability to edit .config files with admin privalages go away with Windows 7?  If so, is there a work around way that works?

Thanks all,

Ian

What are you using to edit the configuration file and what error message are you seeing when you try to open the file?

If you already have read & execute rights, most likely the reason is either a) you're using the wrong application to open the config file or B) you need to take ownership of the file(s) in question.

Take Ownership of a File or Folder (Win 7)

Before you follow the directions in the link above, I recommend changing the file extension to .txt and open it with something simple as Windows Notepad.  If you are able to open the file with it, make the changes you need, save the changes (ctrl + s), then change the file extension back to the original.  I strongly recommend that you make a backup of the original configuration file before making any changes.

EDIT:

Nevermind, I just noticed that your path is pointing to the default Windows directory.  If I am not mistaken, I think that the WFP mechanism prohibits any file within the %windir% environment from being edited directly by the user.  (Even a user with admin rights).  Try copying the config file to another folder e.g. (C:\Temp) and edit the file from there.

Edited by Tushman, 24 July 2012 - 01:22 PM.


#3 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,591 posts

Posted 24 July 2012 - 02:32 PM

Thanks for the info Tushman, I will give your suggestion a try and see what happens.  There is almost "ALWAYS" a work around for something.  :)
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
Arch Linux Environment Setup How-To Learn how to not only install Arch Linux but learn more about the inner workings of Linux
"I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what i meant."
- Robert McCloskey
Registered Linux User:  526317 10/22/2010
Posted Image  Posted Image  Posted Image Posted Image

#4 OFFLINE   crp

crp

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,695 posts

Posted 24 July 2012 - 02:33 PM

the win7-64 i use at work does not have a machine.config but i was just able to edit the jsc.exe.config using notepad from the Administrator CLI

#5 OFFLINE   amenditman

amenditman

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,888 posts

Posted 24 July 2012 - 02:34 PM

View PostTushman, on 24 July 2012 - 01:13 PM, said:

Nevermind, I just noticed that your path is pointing to the default Windows directory.  If I am not mistaken, I think that the WFP mechanism prohibits any file within the %windir% environment from being edited directly by the user.  (Even a user with admin rights).  Try copying the config file to another folder e.g. (C:\Temp) and edit the file from there.
If the admin user does not have write permissions, how is he going to copy the edited file back to the original location? Wouldn't that require write permissions?
Tweak it 'til it breaks, then learn how to fix it.  L.I.F.E. (Linux Is For Everyone)
Registered Linux User # 474004 (06/16/2008)

The HeliOS Project  -  B.O.D.
A Child's Exposure to Technology Should Never Be
  Predicated On The Ability To Afford It

#6 OFFLINE   Temmu

Temmu

    The Assimilator

  • Forum MVP
  • 9,805 posts

Posted 24 July 2012 - 11:02 PM

.net may be using the file.
in-use files cannot be modified.(1)


(1) yeah, yeah, i know, mysql, sql server, exchange, access, et al do it all the time,
but they lock files differently.

ps
boot w/ linux and see if can edit the file now!
bet you can! :D
Posted Image

#7 OFFLINE   goretsky

goretsky

    Multithreader

  • Forum Moderators
  • 1,225 posts

Posted 25 July 2012 - 04:17 AM

Hello,

As Tushman and CRP alluded to, I think the problem may be with the permissions of the program you are using to edit the file.

I'm guesing you launch it by running the program off the Start Menu, Windows desktop, a toolbar, tile or some other location from the GUI, correct?  If so, it's probably starting with the split-token permissions introduced in Windows Vista meant to help protect users who were running as Administrator from getting infected by malware.

Per CRP's suggestion, try opening a Command Prompt as an Administrator, starting the text editor from there, and then opening, editing the .confg file.  Let us know if that solves the problem.

Regards,

Aryeh Goretsky
Dexter is a good dog.
Aryeh Goretsky
Microsoft MVP Windows Expert - ITPro
My blog.

#8 OFFLINE   Tushman

Tushman

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,799 posts

Posted 25 July 2012 - 01:04 PM

View Postamenditman, on 24 July 2012 - 02:34 PM, said:

If the admin user does not have write permissions, how is he going to copy the edited file back to the original location? Wouldn't that require write permissions?

There's no reason why a user with Admin rights shouldn't be able to copy a file back to the original location in question.  Even with the UAC turned on, the user will get a prompt, but it should work.  I've done it before w/ no problems.  Also taking ownership of the folder would also overcome that obstacle.

#9 OFFLINE   Temmu

Temmu

    The Assimilator

  • Forum MVP
  • 9,805 posts

Posted 27 July 2012 - 01:23 PM

um... win 7 sux like that - there are folders (directories) that the local admin (most powerful user) cannot log on to.
yes, you can ruin win 7 intended security by taking ownership and then granting access, but... i would not.

if one needs a step-by-step, i'll do that..

ps
as i said in prev post, boot into a live linux cd and you can write anywhere to your heart's content.

Edited by Temmu, 27 July 2012 - 01:25 PM.

Posted Image

#10 OFFLINE   amenditman

amenditman

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,888 posts

Posted 27 July 2012 - 02:58 PM

View PostTemmu, on 27 July 2012 - 01:23 PM, said:

ps
as i said in prev post, boot into a live linux cd and you can write anywhere to your heart's content.

PartedMagic Live CD/USB to the rescue...as usual.
Tweak it 'til it breaks, then learn how to fix it.  L.I.F.E. (Linux Is For Everyone)
Registered Linux User # 474004 (06/16/2008)

The HeliOS Project  -  B.O.D.
A Child's Exposure to Technology Should Never Be
  Predicated On The Ability To Afford It

#11 OFFLINE   goretsky

goretsky

    Multithreader

  • Forum Moderators
  • 1,225 posts

Posted 30 July 2012 - 01:35 AM

Hello,

I think it's a bit of extra work to boot from a Linux Live CD just to edit .config file.  At least, let's see if IChase can get back to us with some replies about what has and has not worked.

Regards,

Aryeh Goretsky
Dexter is a good dog.
Aryeh Goretsky
Microsoft MVP Windows Expert - ITPro
My blog.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users