Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.2
-
None
Description
The Windows.pm::set_computer_hostname subroutine does not work properly because the command it assembles contains single quotes. The following warning is generated in vcld.log:
---- WARNING ---- 2015-07-14 13:28:57|Windows.pm:set_computer_hostname|12392|failed to set computer name of <vcl db name> to <resolved hostname>, exit status: 218, command: echo | cmd.exe /c "C:/Windows/Sysnative/Wbem/wmic.exe COMPUTERSYSTEM WHERE Name='%COMPUTERNAME%' Rename '<resolved hostname>'" output: Invalid Verb Switch. ( 0) Windows.pm, set_computer_hostname (line: 12392) (-1) test.pm, process (line: 89) (-2) vcld, make_new_child (line: 600) (-3) vcld, main (line: 357)
The single quotes around %COMPUTERNAME% and the intended hostname need to be changed to double quotes and properly escaped.