DanysysTeam / PS-SFTA

PowerShell Set File Type Association
253 stars 53 forks source link

Change registry values for different user #22

Closed flox44 closed 1 year ago

flox44 commented 1 year ago

Hi,

Is it possible to change the registry entries for a different user than the script was started from?

If I change the registry values in the script with them from the specific user SID, it doesn't work.

I hope I post this in the right category here.

Thanks

Danyfirex commented 1 year ago

I've never done before. have you tried using Start-Process powershell.exe adding -Credential $Credential? I think it may work.

flox44 commented 1 year ago

That could do it but won’t be a solution for me. Because I have to fully automate the installation without any UI, and if you do it with $Credential, powershell asks for password (We‘re in a Windows Domain, so the password can’t be stored for every user - I think?!)