Jump to content


MdKnightR

Established Members
  • Posts

    11
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MdKnightR

  1. Okay, I think you may be onto something. I ran psexec -i -s Powershell.exe , then executed the script manually. All it did was write the txt file and the apps are still there.
  2. I did, but I also kinda switched gears. I decided to try to accomplish the app removal by way of a scheduled task that runs on system start. The task runs before a user logs in, and the txt file will appear in C:\Temp, but the apps are still there. It doesn't make sense because I can still run the powershell script manually to strip out the apps.
  3. I haven't tried that. I just assumed that it isn't running, because it either runs and removes the apps or it doesn't. I can confirm that the Powershell script is a good script. I can run it manually with elevated privileges and it'll strip all the apps out that I want gone. I just can't seem to make it work automatically.
  4. Adding the SetupComplete.cmd and SetupComplete.ps1 files to the scripts folder had no effect. The apps are still there upon login after applying the Feature Update.
  5. To be clear, there is no SetupConfig.ini, or WSUS directory to put it in, until I create it. However, I will leave out that part and just put the SetupComplete.cmd and SetupComplete.ps1 files in the scripts folder and see what happens. It may be worth noting that the %WINDIR%\Setup\Scripts\ already has a SetupComplete.cmd file in it, along with a file named DisableCMDRequest.TAG (not sure if that is relevant). Should I replace SetupComplete.cmd with my custom one, or edit existing with the additional content that triggers the Powershell script? The existing one contains the following: %windir%\system32\osdsetuphook.exe /execute I had considered it, but I have read that it might cause issues with the ConfigMgr client on the upgraded PC. Also, we want to leverage Windows 10 Servicing for the Feature Updates, and from what I gather, you can't do both. As for AppLocker, it just disables the apps rather than eliminating them.
  6. Okay, here's the problem I've been experiencing today. The feature update will not install if the SetupConfig.ini file points to %WINDIR%\Setup\Scripts\ . Just as soon as I removed it from the WSUS folder, it installed. I guess the installation must read the INI file at the early stages of the deployment?
  7. I don't see SetupConfig.ini anywhere under that directory. 2 files total in c:\temp (SetupComplete.cmd and SetupComplete.ps1). SetupConfig.ini in the WSUS directory with the modified parameter PostOOBE=C:\Temp\SetupComplete.cmd See attached This seems to have me stuck, and I've been working on it all day today. I modified my task sequence to put the files where you recommended, and now it won't install the Feature Update. It keeps returning an error code 0XC190010D. I have tried re-imaging the laptop, same result. I have tried removing the scripts after they were applied to the laptop, same result. I suppose my next course of action is to disable the task sequence that deploys the scripts, reimage the laptop again, and see what happens. setupact.log
  8. Okay, that didn't work. The WSUS directory disappeared just like before, along with the SetupConfig.ini file. I had placed the other 2 files in C:\Temp and they are still there. Any other ideas?
  9. I haven't yet, but I'll give it a shot. I'm just wondering if it is normal behavior for the WSUS directory to get deleted during the update? And, if so, does SetupConfig.ini get read before the folder disappears? If it does, then it would stand to reason that your suggestion should work.
  10. Hello all. I'm new here and I have a question related to this topic, specifically dealing with the use of SetupConfig.ini. If I am posting this in the wrong thread, I apologize. I am using Windows 10 Servicing in SCCM to update our clients from Windows 10 1607 to 1703. I have done an exhaustive search for an answer to how to prevent provisioned apps from reinstalling themselves after the update, and all that I've found points to the use of SetupConfig.ini to trigger a batch file that will run a Powershell script before the user logs in for the first time. I have no problem copying these files to the test machine using a task sequence. I have no problem running the Servicing Plan. The computer has no problem updating. However, the WSUS directory under %systemdrive%\Users\Default\AppData\Local\Microsoft\Windows\ completely disappears after the feature update, so it never gets a chance to run the script to remove the default Windows 10 apps. Here are the contents of each file I am using: SetupConfig.ini - [SetupConfig] PostOOBE=C:\Users\Default\AppData\Local\Microsoft\Windows\WSUS\SetupComplete.cmd SetupComplete.cmd - @echo off Set psfile=%~dp0SetupComplete.ps1 if exist %psfile% ( Powershell.exe -ExecutionPolicy Bypass -File %psfile% -WindowStyle Hidden ) SetupComplete.ps1 - # Get a list of all apps $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name # Loop through the list of apps foreach ($App in $AppArrayList) { # Exclude essential Windows apps if (($App.Name -in "Microsoft.WindowsCalculator", "Microsoft.WindowsStore", "Microsoft.Appconnector", "Microsoft.WindowsCommunicationsApps", "Microsoft.WindowsSoundRecorder", "Microsoft.DesktopAppInstaller", "Microsoft.StorePurchaseApp")) { Write-Output -InputObject "Skipping essential Windows app: $($App.Name)" } # Remove AppxPackage and AppxProvisioningPackage else { # Gather package names $AppPackageFullName = Get-AppxPackage -Name $App.Name | Select-Object -ExpandProperty PackageFullName $AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App.Name } | Select-Object -ExpandProperty PackageName # Attempt to remove AppxPackage try { Write-Output -InputObject "Removing AppxPackage: $($AppPackageFullName)" Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop } catch [System.Exception] { Write-Warning -Message $_.Exception.Message } # Attempt to remove AppxProvisioningPackage try { Write-Output -InputObject "Removing AppxProvisioningPackage: $($AppProvisioningPackageName)" Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop } catch [System.Exception] { Write-Warning -Message $_.Exception.Message } } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.