Author Topic: What commands are you using to reset the file permissions?  (Read 18468 times)

0 Members and 1 Guest are viewing this topic.

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
What commands are you using to reset the file permissions?
« on: April 09, 2013, 01:44:34 pm »
I have been dealing with WMI issues for months now on Windows 7 machines and absolutely everything we tried with regards to repairing / rebuilding WMI didn't work.  Then I found your All In One tool and voila(!), WMI is working again.  The only catch is that it wasn't your WMI repair that did the trick, it was the Reset File Permissions command.  We determined this by running only one task at a time on various computers and only running this command fixes the issue.  AWESOME!!!!  But, we would like to script the fix so we started playing with commands such as icacls but still can't fix it ourselves.  Would you please tell us what commands you are running for this task so we can zero in on the files and folders that are causing us grief so we can automate the fix?  Thank you so much.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #1 on: April 09, 2013, 01:57:53 pm »
Hhhmm, should I share my tricks? lol


Shane
« Last Edit: April 09, 2013, 03:04:09 pm by Shane »

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #2 on: April 09, 2013, 02:55:08 pm »
Shane, you rock man!!!  Copied and pasted to my super secret files ;-)

I will think about some of the mega scripts I have written in the past to share with you to pay you back. 

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #3 on: April 09, 2013, 03:04:31 pm »
Sounds good to me :-)

Shane

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #4 on: April 10, 2013, 09:42:21 am »
Hello again.  I spent the better part of yesterday trying so many different commands and could not find which file, folder, or registry key is keeping WMI from working.  So, I decided to try your tools again, one at a time, in hopes to zero in on it and I found something interesting; there's something different between your standalone tools and the AIO.

Here's what I did:
Downloaded and ran the standalone 'Reset File Permissions' tools.  Problem not resolved.
Downloaded and ran the standalone 'Reset Registry Permissions' tools.  Problem not resolved.
Downloaded and ran the AIO tool, clicked Unselect All, only ticked Reset Registry Permissions and Reset File Permissions and voila(!), problem resolved!

Any idea why?  Is there an ever so slightly different command you are running in AIO for one (or both) of these tasks than the one you are running in the standalone tool?  Any advice you can provide is greatly appreaciated as I am so close...

Thanks,

Paul

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #5 on: April 10, 2013, 02:57:55 pm »
Try this, run the single exes again. When you do open task manager and look at the cmd.exe, for account it should say System, you will notice that with the all in one. Let me know if it is running the repairs in the system account or not :wink:

Shane

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #6 on: April 10, 2013, 03:27:00 pm »
Nope, it sure isn't running as the SYSTEM account, it's running with my standard user account (without admin rights).

<edit>I spoke too soon... That screen shot was from the first stages where a cmd window opens and closes very quickly (I managed to grab a screen shot anyway) but then when your next stage kicks in it does run another cmd.exe as the SYSTEM Account (screen shot also attached)</edit>
« Last Edit: April 10, 2013, 03:32:15 pm by paulanthony »

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #7 on: April 10, 2013, 03:28:41 pm »
OK thats the reason then. Is the psexe file in the files folder with the program?

Oh and you cant run it over the network as well.

Shane

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #8 on: April 10, 2013, 03:36:56 pm »
I've now run both standalone tools and can confirm that all stages run as SYSTEM.  In the very first reply there wasn't a cmd window opened by the tool when I took the screen shot but when it did open I can confirm that all ran as SYSTEM.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #9 on: April 10, 2013, 03:39:36 pm »
Odd, both repairs are the same as the all in one and they are running under the system account.

Do the single repairs take as long as the all in one as well?

Shane

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #10 on: April 10, 2013, 03:50:34 pm »
They seemed to take about the same length of time.  I couldn't find a verbose log but I did copy the text area with the running status and they appeared the same.  The File Permissions tool took 7 min 8 sec  and the Registry Permissions tool took 5 min 22 seconds.  The AIO took around 10 minutes but I didn't capture the exact run times from that one.  I just scrolled through the window to make sure each stage looked the same and they did.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #11 on: April 10, 2013, 04:01:17 pm »
I am checking the code and they match. But I am looking at 1.9.13

I dont remember changing anything since 1.9.10 but try this, grab this
http://www.tweaking.com/content/page/restore_important_windows_services.html

Get the exe from there and replace it in the other ones. All the repairs are in this one exe, it just uses the data.dat to know which repair to show. It is a trick I did so I didnt need to modify 30 exes lol

see if the 1.9.13 works for you, if it does I will just update the files on the server :-)

Shane

Offline paulanthony

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 7
  • Karma: 0
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #12 on: April 10, 2013, 09:47:05 pm »
Thanks again Shane.  That's a cool trick with the exe :)

I will have to try your suggestion tomorrow as I have now fixed all of the broken computers for today and need to hunt down another one.  Thanks again for the quick replies.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: What commands are you using to reset the file permissions?
« Reply #13 on: April 11, 2013, 01:07:13 pm »
No problem :-)

Shane