question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PowerShellWrapper does not disable profile loading causing errors and slower startup

See original GitHub issue

This seems to be the same as #493 but since that is closed I’ve created this new issue.

When invoking PowerShell.exe my profile gets loaded and it fails to run in this enviornment. This is because PowerShell.exe is not launched with -NoProfile here in PowerShellWrapper.cs.

Other options should be applied here too. -ExecutionPolicy Bypass to avoid the script policy setting blocking (I see another issue sufferes from this) and -Noninteractive (not familiar with that but it looks right).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ChrisGuzakcommented, Jan 25, 2019

I debugged this and see the lpCommandLine looks suspicious, there are 2 mentions of PowerShell.exe.

"C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" PowerShell.exe -ExecutionPolicy Unrestricted -NoProfile -Noninteractive -command '& ''c:\users\chrisg\appdata\local\microsoft\visualstudio\15.0_d615e888\extensions\hto2yfm0.5s5\clang-build.ps1''  -proj ''F:\Source\Repos\wil\tests\Tests.vcxproj'' -file ''F:\Source\Repos\wil\tests\ComTests.cpp'' -active-config ''Debug|Win32'' -clang-flags  (''-Wall'',''-fms-compatibility-version=19.10'',''-Wmicrosoft'',''-Wno-invalid-token-paste'',''-Wno-unknown-pragmas'',''-Wno-unused-value'') -tidy-fix ''-*,google-...```
0reactions
Enache-Ionutcommented, Mar 12, 2021

I will close this issue because of the lack of feedback and because we cannot reproduce it anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slow startup when loading one-line profile on a SSD #4239
Powershell takes a lot of time to launch, even on my computer with an SSD disk. It says "Loading personal and system profiles...
Read more >
PowerShell steps to fix slow startup
from my C:\Users\USERNAME\OneDrive\Documents\WindowsPowerShell[profile.ps1|Microsoft.PowerShell_profile.ps1] paths, the loading became instant.
Read more >
PowerShell profile does not load
Solution: change execution policy. Launch PowerShell as administrator; Set-ExecutionPolicy -ExecutionPolicy Unrestricted. The error message ...
Read more >
Windows 10 profiles and startup takes forever
Method 2: Disable Processes with High Startup Impact Some unnecessary processes with high startup impact can cause slow boot in Windows 10.
Read more >
FSlogix Failed to acquired logon lock on Server 2016 ...
On server 2016 we do not use the ' profile' vhdx only the OFDC. ... We have also built are own powershellwrapper script...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found