Monday, June 7, 2021

Find the command line for an Appx (UWP) app

 Well this doesn't feel like a great solution but it works for now.  If I find a better way I'll come back and update this.

Scan your AppX package details and pull out ones that have a key word.  In this case we'll use Camera as an example

get-appxpackage | ?{$_.PackageFullName -like "*camera*"}

which returns

Name              : Microsoft.WindowsCameraPublisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

Architecture      : X64
ResourceId        :
Version           : 2021.105.10.0
PackageFullName   : Microsoft.WindowsCamera_2021.105.10.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.WindowsCamera_2021.105.10.0_x64__8wekyb3d8bbwe

IsFramework       : False

PackageFamilyName : Microsoft.WindowsCamera_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe

IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False

Dependencies      : {Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe, 

                    Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe, 

                    Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe}

IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

Go to the InstallLocation and open the AppxManifest.xml and locate the Application ID.  In this case the line appears:

<Application Id="App" Executable="WindowsCamera.exe" EntryPoint="Microsoft.CameraApp.Windows.App">

Now we have the items to create the command line

explorer.exe shell:appsfolder\<PackageFamilyName>!<Application ID>

e.g.

explorer shell:appsfolder\Microsoft.WindowsCamera_8wekyb3d8bbwe!App

Tuesday, January 26, 2021

Quick Assist elevating

My preferred method of working around the pause screen when it stops you dead on a quick assist session attempting anything that challenges using user account control (UAC).  I say now that it requires the user to click the yes button on a UAC prompt when you launch regedit.  After that this technique lowers the default UAC level until it is set back to the default setting.  I had to use this approach to help a user during the pandemic.  Normally I would have just waited until the next time I went round to visit.

Run cmd as the user and then

runas /user:admin cmd.exe

This then prompts for the password and you have a cmd window running as the admin; but it is not elevated.  If you attempted to run a software installer which required elevation you you still get the pause screen while the user was prompted about if they wanted to run the installer and change the computer settings etc.

At this point run regedit.exe and request that the user selects the Yes button. Regedit is now elevated.

Under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

set
PromptOnSecureDesktop from 1 (default) to 0
ConsentPromptBehaviorUser 1 (default) to 3

Note the US spelling of Behavior!

UAC prompts will no longer cause pause screens.  It is possible to launch a cmd.exe (Run As Administrator) to make it fully elevated.

This is based on a remoting into a standalone workgroup computer.  Attempting similar on a domain computer would still work however group policy could reverse the settings at anytime.  It is therefore probably not as useful for domain joined computers with group policies.



Tuesday, September 22, 2020

Unable to update the password

 

This can be super annoying.  You need to change your password but when you enter a completely legitimate, compliant new password you just get:


Unable to update the password.  The value provided for the new password does not meet the length, complexity, or history requirements of the domain.


WHY!?  It's NONE of those.


There may be a policy in force that limits the number of times you can change your password within a specific time period.  If it set to 12 hours and your password was changed less than 12 hours ago you will get the above response.

Tuesday, September 8, 2020

PXE-T04 and PXE-E36 errors

 


This was encountered in a lab environment.  Everything looked fine.  Network ports all checked.  Another existing windows client on the same subnet could even complete the TFTP download of the target smsboot\x64\wdsnbp.com file.  Event logs indicated that the TFTP transfer began but then failed producing a an Event ID 4101 in the Deployment-Services-Diagnostics Admin log.

The Following Client failed TFTP Download:
Client IP: 10.0.3.13
Filename: smsboot\x64\wdsnbp.com
ErrorCode: 1460
File Size: 30832
Client Port: 2071
Server Port: 53574
Variable Window: false

This post suggested a block size change which resolved the issue after a WDS service restart.

https://social.technet.microsoft.com/Forums/office/en-US/a1246f62-6a8a-482b-9323-7e02dfeab196/wds-tftp-errorcode-1460

This older article also refers to block size changing
https://support.microsoft.com/en-gb/help/975710/operating-system-deployment-over-a-network-by-using-wds-fails-in-windo

Changing the block size is achieved in the registry as follows

Location:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WDSServer\Providers\WDSTFTP
Name: MaximumBlockSize
Type: (REG_DWORD)
Value range: 512–1456
Base: (Decimal)


Setting a 512 value resolved the problem.

The value can also be changed in the WDS applet in Maximum Block Size on the TFTP tab of the WDS server properties.

SCCM 2012 2002 (Microsoft Endpoint configuration manager) on Windows Server 2019


Monday, August 3, 2020

Edge Profiles - launch selected profile.


If you have multiple Edge profiles, it may be useful to launch directly into your selected profile.  To do this, set your default profile i.e. not the last used, and then create shortcuts to launch edge with your various other profiles.

By default, Edge 84.0.522.52 will launch into the last used profile.  It does not seem possible to override this behaviour and fix the default permanently.  Using this settings page to fix the default profile edge://settings/profiles/multiProfileSettings only achieves exactly what it describes. i.e. controls the profile used by links from external apps such as email.
"By default, Microsoft Edge uses the last used profile to open links in email or other applications. If you have other profiles in Microsoft Edge, you can choose which one to use."

It does not fix the default and stop it being changed by closing Edge when a different profile is active.

Edge stores the user profile in folders under %LOCALAPPDATA%\Microsoft\Edge\User Data .
Default is the first profile with additional profiles stored under folders called Profile 1, Profile 2 and so on.

It is possible to specify the profile required at launch with a command line and parameter of
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --profile-directory="Default"
or
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --profile-directory="Profile 1"
etc

Edge Profile Picture.png files in the profile folder may contain a profile picture if one exists providing one method of identifying the Profile.

The Edge shortcut in the start menu will always launch with the profile that was active when Edge was last closed.  This could could be the profile in Profile 1 if that was the active profile when Edge was last closed.  The profile in the Default is not necessarily the profile that will be used when the Edge start menu shortcut is selected.

Set a file association back to Choose a default


Backup the reg key
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.<ext>]

then delete it.

The file assocation in Settings_Apps_Default Apps_Choose default applications by file type will revert to Choose a default.

Saturday, August 1, 2020

Edge Microsoft Account Sign In Loop


Edge may require some Microsoft sites to be added specifically allowed to store cookies.  Addition of the sites specified in the article below may prevent a sign in looping effect where you are constantly prompted to sign in, even after submitting credentials.

https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop