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.

Access rights powershell script

See original GitHub issue

When using the compile option for Clang PowerTools i get the below error in my visual studio output window.

. : File D:\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running script
s is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?Lin
kID=135170.
At line:1 char:3
+ . 'D:\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

When looking at ScriptConstants.cs you call powershell with the following syntax: @"PowerShell.exe -ExecutionPolicy Bypass -NoProfile -Noninteractive -command '&";

The given error suggests that Bypass is actually not activated and that my profile is still loaded?

PowerShellWrapper is using kPowerShellPath and in that case the above parameters are not supplied. Hence, i think PowerShellWrapper should alsoapply the above arguments?

Note: even though i get these errors the compilation continues, hence its not a showstopper.

I am on windows 10, VS2017 with version 4.5.0 of your plugin and visual studio started as administrator.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Enache-Ionutcommented, Jan 28, 2019

Hi,

Everything you said in your hint is already mentioned in the Arguments section of the Process.StartInfo. Currently we are searching for another way to run the PowerShell script. ChrisGuzak created another issue for this (#506) where he mentioned a possible problem. We will investigate it and a fix will be ready soon.

0reactions
Enache-Ionutcommented, May 15, 2019

How this is a duplicate issue I will close it now. You can follow the evolution of it here: https://github.com/Caphyon/clang-power-tools/issues/506.

Thank you for taking the time and helping us make a better product.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add-MailboxFolderPermission (ExchangePowerShell)
The AccessRights parameter specifies the permissions that you want to add for the user on the mailbox folder. You can specify individual folder...
Read more >
How to Use PowerShell to Manage Folder Permissions
PowerShell is able to quickly create, modify, and delete file and folder permissions within the Windows NTFS file system. Many system ...
Read more >
How to set permissions to run PowerShell Scripts?
How to set permissions to run PowerShell Scripts? Category: Tutorials > Operating Systems > MS Windows > Administration. Select Language ​ ...
Read more >
Set and Check User Rights Assignment via Powershell
You can add, remove, and check User Rights Assignment (remotely / locally) with the following Powershell scripts.
Read more >
How to Export Folder Permissions to Excel or CSV File
With the help of a PowerShell script, you can export folder permissions to a CSV file and open it in Excel, so you...
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