0
votes

I wanto to add startup script to windows VM instance Google (windows server 2012 datacenter).

I added statup script by custom metadata:

  • Key: startup-script
  • Value: #!/bin/bash mkdir C:\newfolder

But, it was not working. No folder was created in C: disk.

Serial port 1 (console) output:

2018/05/10 07:07:51 GCEMetadataScripts: Starting startup scripts (version 4.1.6@1). 2018/05/10 07:07:51 GCEMetadataScripts: No startup scripts to run.

Please help.

2

2 Answers

1
votes

I think you have to use the Windows specific keys like windows-startup-script-ps1. See https://cloud.google.com/compute/docs/startupscript#providing_startup_script_contents_directly

0
votes

Thank user835611 so much.

I did it.

I encounter another problem when running a complex script: download exe file from link and run it.

My script:

  http://hayketnoi.com/abc.exe C: \ abc.exe

  C: \ abc.exe

abc.exe is a winform application and I did not have a remote desktop at that time.

Any solution for my case? I'm doing this well with Vultr's VPS system.