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

only works on admin user account and not second account #72

Open
anonfaded opened this issue Jun 14, 2024 · 11 comments
Open

only works on admin user account and not second account #72

anonfaded opened this issue Jun 14, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@anonfaded
Copy link

anonfaded commented Jun 14, 2024

It worked fine on admin main account on windows 11, but on second user account it isn't working. I opened powershell with admin priv but the script doesn't run so then i logged in from admin account and opened power shell > changed directory to other user and then used commands, it showed in terminal that it worked but it didn't remove anything when i logged in again from other account.

@Raphire Raphire self-assigned this Jun 14, 2024
@Raphire Raphire added the bug Something isn't working label Jun 14, 2024
@Raphire
Copy link
Owner

Raphire commented Jun 14, 2024

Heya,

Is there a particular error showing when attempting to run the script for the second user?

Sidenote: The script applies most of the changes to the current logged in user, changing directory will not change the behaviour of the script.

@anonfaded
Copy link
Author

changing directory will not change the behaviour of the script.

oh so this is the issue then. The error i get on second user is that it needs admin priv to run the script, even when i open the power shell as admin, it still says that it needs admin priv to run the script.

And when i double click the script it just blinks the terminal window and closes itself, tried the advance method and all mentioned in README but it didn't work at all. It should work when power shell is opened as admin but idk why it still asked for admin priv.

@Raphire
Copy link
Owner

Raphire commented Jun 15, 2024

Interesting. I'll try to do some testing of my own to see if I can reproduce this issue.

@anonfaded
Copy link
Author

Interesting. I'll try to do some testing of my own to see if I can reproduce this issue.

Yeah you can reproduce it by using it on second user account and it will probably be same as what i got. On Admin power shell window it was still asking for admin rights so here idk if its the issue with the script or its how windows works on accounts with no admin priv.

@johnnyq
Copy link

johnnyq commented Jun 21, 2024

yes I can confirm the same here. We created a localAdmin account Ran it on there just fine then we joined it to the active directory domain logged in as a regular domain user attempted to run the debloat and asked for admin password in which we entered.
It ran though its paces but didnt actually do anything in the end

@Raphire
Copy link
Owner

Raphire commented Jun 23, 2024

Heya,

Just wanted to do a quick update. I have been able to reproduce this issue myself.

The issue stems from the fact that the user context changes when running an elevated powershell prompt from a standard user account. This means the script will apply the changes to the admin account instead of the intended account.

I'll try to look into solutions for this issue and report back soon 🙃

@anonfaded
Copy link
Author

@Raphire Also i wanted to ask you that how to remove this windows update icon from start menu or stop windows from asking to update? idk whats the issue with it but it just keeps failing when i try to install the update. So i want to remove it completely.
image

It always fails when it reaches 25%
image

@Raphire
Copy link
Owner

Raphire commented Jun 23, 2024

@Raphire Also i wanted to ask you that how to remove this windows update icon from start menu or stop windows from asking to update? idk whats the issue with it but it just keeps failing when i try to install the update. So i want to remove it completely. image

It always fails when it reaches 25% image

There's ways to disable the icon as seen here: https://www.tenforums.com/tutorials/142276-enable-disable-windows-update-status-taskbar-icon-windows-10-a.html

But I would rather look into why the update fails and try to solve that. This recent wifi exploit is a great example of why it's important to keep your system up to date.

P.s. I have enabled discussions on this repo, this is a better place for these kinds of questions, rather than in this issue.

@Knight-sysdev
Copy link

Knight-sysdev commented Aug 16, 2024

I'm trying to troubleshoot this myself and i can really only think of elevating and de-elevating the user's permissions but that's a clear security risk.

Same issue with Sophia Script too, anyone got any other Debloating software? Specifically, something I can deploy.

@Raphire
Copy link
Owner

Raphire commented Aug 16, 2024

I'm trying to troubleshoot this myself and i can really only think of elevating and de-elevating the user's permissions but that's a clear security risk.

Same issue with Sophia Script too, anyone got any other Debloating software? Specifically, something I can deploy.

The reason for this issue comes down to the fact that the elevated powershell prompt is run within the context of the administrator account, not the logged in user. I am working on something that would allow you to select which user to apply changes to, but I haven't had a lot of time to work on it lately so I don't have an ETA unfortunately.

@Raphire Raphire closed this as completed Aug 16, 2024
@Raphire Raphire reopened this Aug 17, 2024
@Raphire
Copy link
Owner

Raphire commented Aug 17, 2024

Accidentally closed this issue, apologies 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants