Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PowerShell System.UnauthorizedAccessException issue when execute RunSamples.cmd #109

Merged
merged 1 commit into from Dec 2, 2015

Conversation

tawan0109
Copy link
Member

  • When executed RunSample.cmd on WIndows 10 (Version 10.0.10240 by ver command), following error happened:

    D:\SparkWorkspace\SparkCLR>RunSamples.cmd --validate
    SPARK_VERSION=1.4.1
    HADOOP_VERSION=2.6
    Set-ExecutionPolicy : Access to the registry key
    'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied. To change the execution
    policy for the default (LocalMachine) scope, start Windows PowerShell with the "Run as administrator" option. To
    change the execution policy for the current user, run "Set-ExecutionPolicy -Scope CurrentUser".
    At line:1 char:1
    > + Set-ExecutionPolicy Unrestricted
    > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >    + CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
    >    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyComma
    nd
    [downloadtools] hadoopVersion=2.6, sparkVersion=1.4.1
    [Download-BuildTools] D:\SparkWorkspace\SparkCLR\tools\TarTool.exe exists already. No download and extraction needed
    ...
    
  • Explicitly set the scope to CurrentUser to avoid this exception.

@skaarthik
Copy link
Contributor

LGTM

tawan0109 added a commit that referenced this pull request Dec 2, 2015
Fix PowerShell System.UnauthorizedAccessException issue when execute RunSamples.cmd
@tawan0109 tawan0109 merged commit 6aa17a6 into microsoft:master Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants