Dim filePath
Dim replaceText
' 获取用户输入的替换值
replaceText = InputBox("请输入电话号码:")
' 创建文件系统对象
Set objFSO = CreateObject("Scripting.FileSystemObject")
' 创建新的 config.cfg 文件
Set objFile = objFSO.CreateTextFile("config.cfg", True)
' 写入文本内容
objFile.WriteLine "#!version:1.0.0.1"
objFile.WriteLine ""
objFile.WriteLine "### This file is the exported MAC-all.cfg."
objFile.WriteLine ""
objFile.WriteLine "### For security, the following parameters with password haven't been display in this file."
objFile.WriteLine "account.1.password = zxcvbnm"
objFile.WriteLine "account.1.auth_name = " & replaceText
objFile.WriteLine "account.1.codec.pcmu.priority = 3"
objFile.WriteLine "account.1.codec.pcma.priority = 4"
objFile.WriteLine "account.1.codec.g729.priority = 1"
objFile.WriteLine "account.1.codec.g722.priority = 2"
objFile.WriteLine "account.1.display_name = " & replaceText
objFile.WriteLine "account.1.enable = 1"
objFile.WriteLine "account.1.label = " & replaceText
objFile.WriteLine "account.1.sip_server.1.address = 192.168.111.150"
objFile.WriteLine "account.1.sip_server.1.port = 5061"
objFile.WriteLine "account.1.user_name = " & replaceText
objFile.WriteLine "features.key_tone = 0"
objFile.WriteLine "features.normal_refuse_code = 404"
objFile.WriteLine "features.ringer_device.is_use_headset = 0"
objFile.WriteLine "features.send_key_tone = 0"
objFile.WriteLine "lang.gui = Chinese_S"
objFile.WriteLine "lang.wui = Chinese_S"
objFile.WriteLine "local_time.dhcp_time = 1"
objFile.WriteLine "local_time.ntp_server1 = 192.168.110.69"
objFile.WriteLine "multicast.codec = G729"
objFile.WriteLine "phone_setting.backlight_time = 0"
objFile.WriteLine "phone_setting.called_party_info_display.enable = 1"
objFile.WriteLine "voice.ring_vol = 2"
objFile.WriteLine "### Static Configuration ###"
objFile.WriteLine "static.network.cdp.enable = 0"
objFile.WriteLine "static.network.lldp.enable = 0"
objFile.WriteLine "static.network.vlan.pc_port_enable = 1"
' 关闭文件
objFile.Close
MsgBox "config.cfg 生成成功!"
add-ipone
于 2024-08-22 14:58:59 首次发布