so I have this
.bat
file:
@echo off
cd C:\Users\user\Downloads
gcloud auth activate-service-account --key-file=keyFileName.json
gcloud auth print-access-token
pause
During the first
gcloud
command, it will suddenly crash the command prompt halfway, but when I copy and paste each line manually into command prompt in the same location as the location I am trying to
cd
to in the
.bat
file, it works... Any idea why? I am on Windows 10 by the way.
Searching on Google, I found two related issues, on Github and Stackoverflow.
Github's solution was using python which was not what I needed and Stackoverflow's one did not have anyone helping him/her...
Thanks
cd
to in the.bat
file, I have edited my question to reflect that. Sorry for the confusion. – Ordonezgcloud
command withcmd /c
You may want to add that as a answer so I can mark this as solved, thanks – Ordonez