- //&@cd "C:\Program Files\abc"&cls&dir /a-d/b "config.ini"|cscript -nologo -e:jscript "%~f0"&pause&exit
-
- function reStr(file){
- var f = fso.opentextfile(file, 1);
- str = f.ReadAll().replace(/^(\[app3\]\r\nWSNADDR=).*/mg, '$1//10.177.102.13:5070,//10.177.102.14:5070');
- f.Close();
- var f = fso.opentextfile(file, 2);
- f.Write(str);
- }
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- while(!WScript.StdIn.AtEndOfStream)reStr(WScript.StdIn.ReadLine());
复制代码
|