DanysysTeam / PS-SFTA

PowerShell Set File Type Association
253 stars 53 forks source link

Error Logging #19

Closed itoc-dw closed 1 year ago

itoc-dw commented 1 year ago

Hi,

We run set-fta on user logins using a powershell logon script. We also capture the errors at the end of the script in the $error variable for review. I noticed there's a lot around set-fta functions and wondering if they are expected?

Some examples are below. I'm not skilled enough to work out exactly what it is doing (not even sure why .tmp files would be used)?

at local:Remove-UserChoiceKey, scriptlocation\User-Functions.ps1: line 632 - Unable to find type [Registry.Utils]. at local:Update-RegistryChanges, scriptlocation\User-Functions.ps1: line 552 - Unable to find type [SHChange.Notify]. at local:Remove-UserChoiceKey, scriptlocation\User-Functions.ps1: line 627 - Could not find a part of the path 'C:\Users\local_USERNAME\Temp\ne5j4dla.tmp'. at local:Update-RegistryChanges, scriptlocation\User-Functions.ps1: line 547 - Could not find a part of the path 'C:\Users\local_USERNAME\Temp\gqq3cmu1.tmp'.

Apologies if this is out of scope, please delete the issue if it is.

Danyfirex commented 1 year ago

Hello, [Registry.Utils] and [SHChange.Notify] issues mean that Update-RegistryChanges and Remove-UserChoiceKey may be failing in Add-Type part. about tmp files it has nothing to do with PS-SFTA. So I'm almost sure issue is related to your login script.

Could You show me the logon PowerShell script you're using, and tell me what OS Version are you getting this issue on?

itoc-dw commented 1 year ago

Hi Dany,

I'll ignore the tmp files. It's multiple scripts and I can't share them here as it considered intellectual property by the company. Pretty much we are are calling your function from a separate function script and calling it in the users logon script for their RDS session (windows 10 multi session - Azure Virtual Desktop).

I can just ignore them its not a big deal, just wasn't sure if the errors were of concern. We aren't having anything reported to us in regards to things setting or not, and if they aren't applying for the users it's not really critical. Just thought you might have seen it before.

Thank you for your time.