My understanding is as follows:
1, with instsrv New add a custom service name service, this service is associated with the Srvany program;
2, Srvany program read the registry corresponding entries, find the main application of the service and follow the parameters of the registry to execute it;
3, this service can be found in services.msc, can be set to boot automatically.
The registry file is written so that the double-click is written. (Registry file suffix is reg)
Windows Registry Editor Version 5.00
[hkey_local_machine\system\currentcontrolset\services\ service name \parameters]
"Application" = "absolute path and parameters of the program that needs to be run"
"Appparameters" = "Parameters required to run program startup"
"Appdirectory" = "absolute path to the directory where the program needs to be run"
Program Absolute Path Example--"C:\\Program Files (x86) \\VMware\\VMware Workstation\\vmware.exe"
Example of startup Parameters-"-X D:\\VMS\\C6-7.VMX"
Directory absolute Path Example--"C:\\Program Files (x86) \\VMware\\VMware workstation\\"
Note: I tested a lot of times, only write a \ is not, to use \ \ Write the path. -X is the background sneak start, open console easy to find the virtual machine, it is recommended to use-X is transferred to the foreground to open the virtual machine. (If the boot needs to start more than one virtual machine, only need to add multiple VMX files in the following absolute path)
Double-clicking on such a reg file will import into the registry later. The next step is to build the service. The commands that you need to type in Cmd.exe are:
Absolute path "Instsrv.exe location" service Name "Srvany.exe"
Example: "C:\Program files\windows Resource Kits\tools\insts Rv.exe "Vm_autopoweron" C:\instsrv\srvany.exe "This has created a service called Vm_autopoweron.
No INSTSRV package, poke here to download
In the Delete Service method cmd, type the following command:
SC Delete Service Name
Instsrv+srvany Create service to start the VMware virtual machine automatically