Is it harmful to change ownership of a file?

Page 1 of 2 12 LastLast

  1. Posts : 531
    Windows 10 Pro x64 Version 21H2
       #1

    Is it harmful to change ownership of a file?


    Hello,

    I have a question regarding taking ownership of an executable that is in the WindowsApps folder in Program Files. I want to take ownership of it so I can make it launch at startup every time I boot up Windows. That's because for some reason, putting a shortcut of the executable in the Startup folder of Windows doesn't launch it at boot.

    The current ownership of that executable is TrustedInstaller but I want to change that to myself. I am wondering however if this would lead to any problems or errors regarding automatic processes that Windows uses for that executable. Or if it would lead to problems if I want to uninstall or reinstall the app.
      My Computer


  2. Posts : 481
    Windows 10 pro 1903 1862.145
       #2

    It might be disastrous. Or you might get away with it. I've had enough difficulty keeping my aging PC afloat that I stay away from such actions. That said, you might look at:

    Add Take Ownership to Context Menu in Windows 10 - Windows 10 Customization Tutorials
    Last edited by Brink; 25 Apr 2017 at 19:07. Reason: link
      My Computer


  3. Posts : 1,809
    W7 Ultimate SP1 (64 bit), LM 19.2 MATE (64 bit), W10 Home 1703 (64 bit), W10 Pro 1703 (64 bit) VM
       #3

    Task Scheduler


    I'd suggest that you don't change any files owned by "TrustedInstaller".

    Have you tried using the "Task Scheduler" to start the App?

    The tutorials shown below might help.

    Tutorials:
    Create Elevated Shortcut without UAC prompt in Windows 10
    Create Startup Apps shortcut in Windows 10
      My Computer


  4. Posts : 25,075
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #4

    lehnerus2000 said:
    I'd suggest that you don't change any files owned by "TrustedInstaller".

    Have you tried using the "Task Scheduler" to start the App?

    The tutorials shown below might help.

    Tutorials:
    Create Elevated Shortcut without UAC prompt in Windows 10
    Create Startup Apps shortcut in Windows 10
    I'd agree. Try anything but taking ownership, the consequences are unpredictable.

    If you can find no other way, then as a last resort take ownership just long enough to add your user account to the permissions. Then give ownership back to TrustedInstaller straight away. The name you'll need to type in the 'Change owner' dialog is: NT SERVICE\TrustedInstaller
      My Computers


  5. Posts : 1,809
    W7 Ultimate SP1 (64 bit), LM 19.2 MATE (64 bit), W10 Home 1703 (64 bit), W10 Pro 1703 (64 bit) VM
       #5

    Bree said:
    If you can find no other way, then as a last resort take ownership just long enough to add your user account to the permissions. Then give ownership back to TrustedInstaller straight away. The name you'll need to type in the 'Change owner' dialog is: NT SERVICE\TrustedInstaller
    When I was testing the W7 Betas, I removed "TrustedInstaller" and then I couldn't restore it.
    Installing a new copy of W7 didn't take long in those days.

    These days I wouldn't think of removing "TrustedInstaller", without creating a backup image of my OS.
      My Computer


  6. Posts : 25,075
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #6

    lehnerus2000 said:
    When I was testing the W7 Betas, I removed "TrustedInstaller" and then I couldn't restore it...
    These days I wouldn't think of removing "TrustedInstaller", without creating a backup image of my OS.
    Well, I did say it was only to be tried as a last resort (if at all) :)

    Restoring ownership to TrustedInstaller is only possible if you use its full name. The 'NT SERVICE' bit is essential, else 'check names' says it can't be found.
      My Computers


  7. Posts : 1,809
    W7 Ultimate SP1 (64 bit), LM 19.2 MATE (64 bit), W10 Home 1703 (64 bit), W10 Pro 1703 (64 bit) VM
       #7

    Bree said:
    Well, I did say it was only to be tried as a last resort (if at all) :)

    Restoring ownership to TrustedInstaller is only possible if you use its full name. The 'NT SERVICE' bit is essential, else 'check names' says it can't be found.
    At the time, I wasn't aware of that issue.
    I only found out about that "trick" a couple of years ago. :)

    Even though I know the trick now, (IMO) it would still be prudent to create a backup image (just in case).
      My Computer


  8. Posts : 25,075
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #8

    lehnerus2000 said:
    ...(IMO) it would still be prudent to create a backup image (just in case).
    IMO too. In fact it's a prudent safeguard even if you're not planning on hacking your system. It's part of my monthly routine, make an image before each cumulative update, and keep the previous images for as long as I have space to do so (I think I still have one for 10240, I certainly have the one for the OEM Win7 this system started with).
      My Computers


  9. Posts : 531
    Windows 10 Pro x64 Version 21H2
    Thread Starter
       #9

    Thanks for the replies guys. I'm amazed taking ownership just to make it launch at startup can have bad consequences like that.


    Bree said:
    I'd agree. Try anything but taking ownership, the consequences are unpredictable.

    If you can find no other way, then as a last resort take ownership just long enough to add your user account to the permissions. Then give ownership back to TrustedInstaller straight away. The name you'll need to type in the 'Change owner' dialog is: NT SERVICE\TrustedInstaller
    If I give it back to TrustedInstaller again, do I still have permission to launch the app at startup?
      My Computer


  10. Posts : 61,909
    64-bit Windows 11 Pro for Workstations
       #10

    Hello Johnny, :)

    If the app requires elevation to run, then it will not be allowed to run at startup by default for security reasons.

    If so, then you could use the tutorial below to create an elevated shortcut of the app, and place the elevated shortcut in your Startup folder as a workaround to run at startup without getting a UAC prompt.

    Create Elevated Shortcut without UAC prompt in Windows 10 - Windows 10 Customization Tutorials
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:57.
Find Us




Windows 10 Forums