Set the machine Name with inno-setup
How can I Get & Set the machine name in may configuration INI
Is there any key or function in inno-Se开发者_如何学运维tup to get the machine name.
See the {computername}
constant. This can then be used as the value in your [Ini] section entry.
You will need this:
function SetComputerName(lpComputerName: PAnsiChar): BOOL;
external 'SetComputerNameA@kernel32.dll stdcall';
And then call this from one of your functions:
SetComputerName(YOURNEWHOSTNAME)
Hope this helps 6 Years later LOL
精彩评论