INSTALL.BAT
TAKEOWN /F %WINDIR%\System32\C_950.NLS /A CACLS %WINDIR%\System32\C_950.NLS /E /G Administrators:F REN %WINDIR%\System32\C_950.NLS C_950.BAK COPY C_950.NLS %WINDIR%\System32INSTALL.VBS(VBS 版需將 C_950.NLS 和 INSTALL.VBS 置於桌面)
Set WshShell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Dim winnlspath , newnlspath , baknlspath winnlspath = WshShell.ExpandEnvironmentStrings("%WINDIR%")&"\System32\C_950.NLS" newnlspath = WshShell.ExpandEnvironmentStrings("%USERPROFILE%")&"\Desktop\C_950.NLS" baknlspath = WshShell.ExpandEnvironmentStrings("%WINDIR%")&"\System32\C_950.BAK" If (fso.FileExists(winnlspath)) And (fso.FileExists(newnlspath)) Then Return = WshShell.run("TAKEOWN /F %WINDIR%\System32\C_950.NLS /A" , 1 , True) Return = WshShell.run("CACLS %WINDIR%\System32\C_950.NLS /E /G Administrators:F" , 1 , True) fso.MoveFile winnlspath , baknlspath If (fso.FileExists(baknlspath)) And (fso.FileExists(newnlspath)) Then fso.CopyFile newnlspath , winnlspath End If Else MsgBox "Can't Find C_950.NLS & Exit" , 0 , "Message" WScript.Quit End If
0 件のコメント:
コメントを投稿