set alias for Power BI

Brass Contributor

My Windows 10 Pro has Anaconda Powershell Prompt, and its $PSVersionTable is:

Name Value


PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

I have to “run as Administrator” in order to run commands in Anaconda Powershell Prompt.  I’m unfamiliar with its commands though, except to activate a conda environment.  After I’ve activated a conda environment (that’s customized for Microsoft Power BI Desktop), I can start the program at C:\Program Files\WindowsApps\Microsoft.MicrosoftPowerBIDesktop_2.105.664.0_x64__8wekyb3d8bbwe\bin\PBIDesktop.exe .

 

Since that path is so long, I want to create a program alias. I followed the instructions to add a new key in Registry Editor. But why do I get the error:

start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
start PBIDesktop

+ CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

P.S. if I click on the shortcut icon for Power BI after activating the conda environment, Power BI will still show a Python script error.  Apparently, it still needs to be started from the conda environment.

5 Replies
Have you try to set it as environment variable
https://www.computerhope.com/issues/ch000549.htm
Ok @farismalaeb, I've added a system variable and a user variable for admin. But Powershell still gives the error.
HI
I tested the URL provided with a similar app and it works fine.
Just make sure that you include the .exe in the Registry Key.
Does the Anaconda require an additional parameter?
Also, if you run the application name alias .exe from Run, are you getting any results

@farismalaebI'm wondering whether the quoted error (in my original post) is caused by the path's security permissions, despite such a cause not being suggested by the error.  When I manually navigate to the path within Anaconda Powershell Prompt though, it does permit me to execute the path's program.  So can I confirm whether the error is indeed caused by my account's security permissions to execute in that folder?

It seems that its a permssion issue, but its not recommend to change these permission.
If you try to access the Path via PowerShell or cmd, you will get Access Denied, but via the shortcut which is created by the app, things will be working fine.