Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add The Google Cloud SDK to Windows Terminal as a profile. I tried to add a profile to the JSON file but that profile closes immediately saying "exited with code 0."

What I have tried:

Here is the profile I added to the JSON file. Don't care about the icon and the background, I wanted to add custom pictures :)
{
                "guid": "{d8567bf5-f802-498a-899a-efedc99a2aa8}",
                "hidden": false,
                "name": "Google Cloud Shell",
                "commandline": "C:\Users\Hp\AppData\Local\Google\Cloud SDK\cloud_env.bat",
                "useAcrylic": true,
                "acrylicOpacity": 0.6,
                "backgroundImage": "C:\\Users\\Hp\\Desktop\\Video Editing\\GIMP\\Gumball edited\\Screenshot(828).png",
                "icon": "C:\\Users\\Hp\\Downloads\\Apps\\Icons\\screenshot__828__mkp_icon.ico",
                "backgroundImageStretchMode": "none",
                "backgroundImageAlignment": "center",
                "backgroundImageOpacity": 0.5,
                "tabColor": "#1a73e8"
              }    
Posted
Updated 3-Oct-21 23:00pm
Comments
Richard MacCutchan 1-Oct-21 12:37pm    
Most likely because the .bat file does not wait for user input, which Powershell, cmd, bash etc. all do.

1 solution

Try:
JSON
"commandline": "%comspec% /k \"C:\\Users\\Hp\\AppData\\Local\\Google\\Cloud SDK\\cloud_env.bat\"",
The /k argument tells cmd.exe to execute the specified command and then continue.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900