Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for user profile installed apps 🥳 #176

Merged
merged 8 commits into from
Oct 11, 2022
Merged

Conversation

Romanitho
Copy link
Owner

Closes #167
Closes #68

@Romanitho
Copy link
Owner Author

@KnifMelti something close to what I was thinking

@KnifMelti
Copy link
Contributor

Then #Set ACL for users on logfile means you're writing user logs to the main log file too?

@Romanitho
Copy link
Owner Author

Yes, to avoid to have several places to troubleshoot. But can be changed, it's still a draft :)

@KnifMelti
Copy link
Contributor

No need to change, I've changed my shortcut handling already...

@Romanitho
Copy link
Owner Author

Romanitho commented Oct 8, 2022

Ok, now it seems to work pretty well :)
For me, just a desktop shortcut pointing to target C:\Windows\System32\schtasks.exe /run /tn "Winget-AutoUpdate" and all is good

@KnifMelti
Copy link
Contributor

If running in user context, shouldn't the black/white list check be inactivated?
I mean, the apps are installed in user context and there's no security reason to block an update (better for security to update!)...

@Romanitho
Copy link
Owner Author

it depends what you have in the white/black list. If you want to block certain apps to update, it doesn't care if you are user or system, no ? Same for white list I guess.

@KnifMelti
Copy link
Contributor

KnifMelti commented Oct 10, 2022

Yes it is important if it's running as system, but not as user.
Because the many ill behaving apps that ex. starts when they're done with the upgrade, opens a website, etc...
When in system context it's a disaster!
That's why we use a whitelist (so we have control by checking the apps upgrade sequence).

If the block is because the version must be a certain one or because you've noticed that it's always fails when upgrading , you're right...
...but I hope/think there's a future plan to mark an apps version as the only one to be installed (even if that's not secure at all)!

@Romanitho
Copy link
Owner Author

yes i agree. but most of apps should be installed for system. It is just for apps installable only in user context.

if I understand well, you whitelist apps for system, but full open for user ?

@KnifMelti
Copy link
Contributor

Yes, that's the scenario we think is needed.
We don't use applocker or similar to block users from installing things in user context either.

@Romanitho
Copy link
Owner Author

because in some cases, my customers want only support whitelist, whatever it is system or user context. They want to avoid to manage side effects

@KnifMelti
Copy link
Contributor

Yes, I understand the total lockdown - support wise - but it's a constant balancing between user experience and security/support.
Either way - could it be an option (like the shortcuts on desktop/start menu)?

@Romanitho
Copy link
Owner Author

with something like -BypassListForUsers ?

@Romanitho
Copy link
Owner Author

The thing is, if you use white list, it means you want to control the apps you want to update. So it doesn't really make sense to have White list for system app and blacklist (with 0 black listed apps in fact) for user. See what I mean ?

@KnifMelti
Copy link
Contributor

Control the apps installed in System context, yes.
In user context we don't want to control anything.
But it's your choice to decide if it's a thing to implement or not :)

@Romanitho
Copy link
Owner Author

yes, i'm working on it :) but under white list, it's easy to say Whitelist for system, nothing for user. But I don't want to handle cross listing ^^ like Whitelist for system and Black list for user... etc

@Romanitho
Copy link
Owner Author

and for blacklist, it's easy. If -BypassListForUsers is set, nothing is blocked under user context

@KnifMelti
Copy link
Contributor

Ah, I see the problem now with Whitelist!
Gone through your code...
...drop the thought!
Nothing is impossible, but how much effort will it take?

@Romanitho
Copy link
Owner Author

made few changes

@KnifMelti
Copy link
Contributor

Ah, nice trick!

@Romanitho
Copy link
Owner Author

Anyway, if -BypassListForUsers is activated, system apps that are in the WhiteList will not be visible or updatable by the User context, so no impact for the user 👍

@Romanitho
Copy link
Owner Author

few more tests and I merge tomorrow

Write-Log "User context execution not installed"
}
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we should remove the winget_system_apps.txt file after user context run. Because if someone uses WAU at home as user with admin right, you can run WAU with your user account and manage all in one. You don't really need the system part (this is mainly for companies where users need system execution to install udates). What do you think @KnifMelti ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, it needs to be determined during install script. If WAU is installed by system (via Intune, SCCM, GPO,...) then, we need to have WAU as it is now. But if WAU is installed by an admin user, then it could run all in one. Sort of optimization ^^
I will think about that for the v1.16.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then make it a choice...
...because a lot of the home admins also have families with no admin rights and they're using the same family computer!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I had other possibilities in mind (to run different way regarding system, admin user and standard user), but we'll leave it like that for now 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants