Quick run instructions not working. #1

Closed
opened 2021-04-20 12:53:49 -04:00 by efrick · 2 comments
Owner
  1. Running directly from CMD doesn't work. This only opens the file in Notepad.

    • Possible fix is putting the powershell invocation before running the file in the quick run instructions.
  2. When run from powershell it gives the following error.

out-file : Could not find a part of the path 'C:\Users\user\%userprofile%\AppData\Local\Temp\sysinfo.ps1'.
At line:1 char:1
+ curl https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sys ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

%userprofile%\AppData\Local\Temp\sysinfo.ps1 : The module '%userprofile%' could not be loaded. For more information,
run 'Import-Module %userprofile%'.
At line:2 char:1
+ %userprofile%\AppData\Local\Temp\sysinfo.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (%userprofile%\A...emp\sysinfo.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule
1. Running directly from `CMD` doesn't work. This only opens the file in Notepad. * Possible fix is putting the powershell invocation before running the file in the quick run instructions. 2. When run from powershell it gives the following error. ```shell out-file : Could not find a part of the path 'C:\Users\user\%userprofile%\AppData\Local\Temp\sysinfo.ps1'. At line:1 char:1 + curl https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sys ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand %userprofile%\AppData\Local\Temp\sysinfo.ps1 : The module '%userprofile%' could not be loaded. For more information, run 'Import-Module %userprofile%'. At line:2 char:1 + %userprofile%\AppData\Local\Temp\sysinfo.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (%userprofile%\A...emp\sysinfo.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoLoadModule ```
efrick added the
bug
label 2021-04-20 12:53:49 -04:00
efrick referenced this issue from a commit 2021-04-20 14:03:35 -04:00
Author
Owner

While the above error doesn't happen anymore it won't execute due to the default execution policy not allowing for it.

The script should be signed.

While the above error doesn't happen anymore it won't execute due to the default execution policy not allowing for it. The script should be signed.
Author
Owner

This has been resolved. See d1cb7daf90

This has been resolved. See d1cb7daf90
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: efrick/Sysinfo#1
No description provided.