.bat file not running on guest machine while vagrant provision

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

.bat file not running on guest machine while vagrant provision

Mayank Suthar

Hi all,

I want to run the .bat file while provisioning vagrant that is should open Notepad ++ in guest machine, but it gives the following error. When the provision is given as "host_shell", that time it runs on host machine but not on guest. Is there any plugin required to run it on guest machine?

 

config.vm.provision "shell" do |s|

            s.inline = "Start '<C:\Program Files (x86)\Notepad++>' Notepad++.exe"

 end  

 

Thanks in Advance. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/05791ac3-b1e0-4959-8cfb-3c82803c45a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: .bat file not running on guest machine while vagrant provision

Alvaro Miranda Aguilera
Hello

If the guest is windows, please open a new session and run that command.

It should give the same error.

Vagrant is just sharing the error here, you need to have a valid script so vagrant can run it.

Alvaro.


On Thu, Jun 22, 2017 at 8:08 AM, Mayank Suthar <[hidden email]> wrote:

Hi all,

I want to run the .bat file while provisioning vagrant that is should open Notepad ++ in guest machine, but it gives the following error. When the provision is given as "host_shell", that time it runs on host machine but not on guest. Is there any plugin required to run it on guest machine?

 

config.vm.provision "shell" do |s|

            s.inline = "Start '<C:\Program Files (x86)\Notepad++>' Notepad++.exe"

 end  

 

Thanks in Advance. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/05791ac3-b1e0-4959-8cfb-3c82803c45a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez2rsY68fQ7sfQbQBWhNzRKroLBvicTdR3G-X1PcVQiQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.