最近幫同事安裝Namo Webeditor 5.5,明明已經輸入完序號。重開機完後,再次使用Namo Webeditor 5.5。卻出現[授權碼已經遺失]的訊息,然後就無法使用 Namo Webeditor 5.5。即使解除安裝 Namo Webeditor 5.5,再重新安裝 Namo Webeditor 5.5,一樣會出現 [授權碼已經遺失]。心裡想著是不是沒有移除乾淨,於是到原先安裝的資料夾中,發現解除安裝後,依舊有Namo的資料夾。於是刪除所有Namo的資料夾,再次重新安裝。沒想到還是出現[授權碼已經遺失]的訊息。最後,啟用Windows 10 Administrator 帳戶,直接用Administrator 帳戶安裝安裝Namo Webeditor 5.5並輸入帳號。重開機後,再次啟用Namo Webeditor 5.5,就看不到[授權碼已經遺失]的訊息。而且可以正常使用[授權碼已經遺失]的訊息。
若能在一開始完成Windows 10 的安裝,接下來啟用Administrator與關閉Windows 10 的初始設定的帳號。以後都使用Administrator,就可以避免上述的情況。
程式碼使用影片教學
程式目的:啟用Windows 10 Administrator 帳戶
檔案名稱:EnabledAdministrator.bat
檔案內容:
@echo off
REM ---------------以下是程式碼,不需更改---------------
REM :: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
REM :: BatchGotAdmin (Run as Admin code ends)
REM :: Your codes should start from the following line
net user administrator /active:yes
shutdown /r /f /T 0 -C "Reboot in 0 seconds"
程式目的:停用Windows 10 Administrator 帳戶
檔案名稱:DisabledAdministrator.bat
檔案內容:
@echo off
REM ---------------以下是程式碼,不需更改---------------
REM :: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
REM :: BatchGotAdmin (Run as Admin code ends)
REM :: Your codes should start from the following line
net user administrator /active:no
shutdown /r /f /T 0 -C "Reboot in 0 seconds"
沒有留言:
張貼留言