开发者

Set the machine Name with inno-setup

开发者 https://www.devze.com 2023-03-30 03:28 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消