Questions about unattended installation parameters.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
HaotongYang
Posts: 32
Joined: 25. Aug 2021, 21:39

Questions about unattended installation parameters.

Post by HaotongYang »

My computer system is: windows10_64
The guest system is: windows10_64
virtualbox version: 6.1.32

What is the purpose of the parameter "--post-install-command" and how is it used? I tried to use "--post-install-command=calc" to call the calculator on the guest system but it didn't work. So I am curious what this parameter is used for.
I am looking for help online.

Another question is, if the parameter "--script-template" is specified can the user and password in the unattended installation parameter be omitted?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Questions about unattended installation parameters.

Post by scottgus1 »

HaotongYang wrote:What is the purpose of the parameter "--post-install-command"
According to the Virtualbox manual https://www.virtualbox.org/manual/ch08. ... unattended :
A single command to run after the installation is completed. The exact format and exactly when this is run is guest OS installer dependent
I have not tried an unattended install. But if 'Calc' did not run, I'd try a batch file that writes to a text file as a test, not a GUI-requiring app like Calc. Maybe this command runs at a time when the GUI is not ready yet? Just a guess.
HaotongYang wrote:if the parameter "--script-template" is specified ...
Unfortunately the manual doesn't describe how this script template is formatted. We'll have to wait for a forum guru to say where to look, or maybe the source code might describe it.
AndyCot
Posts: 300
Joined: 29. Feb 2020, 03:04

Re: Questions about unattended installation parameters.

Post by AndyCot »

Last year when I tried to use it to install apps the option did not work for exe, bat or cmd files or sh (depending on OS). I gave up and had to manually run the install script after the guest was up and running.
HaotongYang
Posts: 32
Joined: 25. Aug 2021, 21:39

Re: Questions about unattended installation parameters.

Post by HaotongYang »

Thank you for your responses. I will be trying more different ones.
Post Reply