2
votes

I am having a VM, windows instance (GCE) on google cloud platform. I want to run a program(.exe) every time at the start of the instance.

I am able to run the file by putting it in the startup folder. but I want to run it using startup script as suggested by google here: running startup scripts on a google compute engine

1

1 Answers

2
votes

To run .exe on GCP when Windows VM instance start/restart.

  1. Click edit on VM instance
  2. Expand Management, security, disks, networking, sole tenancy section
  3. In the Metadata section, provide windows-startup-script-cmd as the metadata key.
  4. In the Value box, provide /path/to/exe-file