Snapin return code -196608



  • SnapinClient returns Code -196608 when starting snapin.

    I have a very simple powershell script to install VS Code utilizing Chocolatey on a Client machine. The script I use:

    choco install vscode -y
    

    When I start the snapin, the log says SnapinClient Return Code: -196608.
    The entire command run is:

    powershell.exe -ExecutionPolicy Bypass -NoProfile -File vscode_snapin1.bs1 
    

    I have read that the problem can hail from the ExecutionPolicy argument. The command works when started locally in a administrative Powershell.

    What am I doing wrong? Is there a way to get a more detailed log of what happens?



  • Hi @TheBitFighter

    can I just double check that the file extension in your code block above is a typo and should read .ps1 not .bs1?

    And Chocolatey is installed already on the endpoint you’re trying to install vscode with (via Chocolatey)?

    I’ve tested your snapin on a client here and provided Chocolatey is installed on the client vscode installs.

    cheers Tom



  • Update: It works. The file ending was the problem.



  • There was indeed a typo in the snapin and it turns out changing it solved the problem. I don’t consider the case closed tho as I had to many flukes today. I will try the other snapins, the update the thread again.



  • Hi @TheBitFighter

    can I just double check that the file extension in your code block above is a typo and should read .ps1 not .bs1?

    And Chocolatey is installed already on the endpoint you’re trying to install vscode with (via Chocolatey)?

    I’ve tested your snapin on a client here and provided Chocolatey is installed on the client vscode installs.

    cheers Tom


Log in to reply
 

242
Online

7.0k
Users

14.2k
Topics

134.3k
Posts