參考文章:
The HP Mini 開機按鈕功能
2017年2月3日 星期五
The HP Mini 開機按鈕功能
F1 = SYSTEM INFORMATIONF2 = STARTUP CHECK
F9 = CHANGE BOOT DEVICE ORDER
F10 = BIOS SETUP OPTION
F11 = SYSTEM RECOVERY
--------------------------------------------------
DOS Script to Reset Windows Update Agent
2017年1月5日 星期四
from: https://gallery.technet.microsoft.com/scriptcenter/Dos-Command-Line-Batch-to-fb07b159
- Stops Windows Update, BITS, Application Identity, Cryptographic Services and SMS Host Agent (SCCM client) services
- Cleans up AU cache folder and log file
- Re-registers *.dll files
- Removes WSUS Client registration Id
- Reset Winsock and WinHTTP Proxy
- Deletes all BITS jobs
- Restart services
- Forces AU discovery
@echo off cls REM ================================================================================== REM DESCRIPTION : This script resets all of Windows Update Agent settings. REM AUTHOR : Luca Fabbri REM VERSION HISTORY: 2.0 - Start REM ================================================================================== @echo 1. Stopping Windows Update, BITS, Application Identity, Cryptographic Services and SMS Host Agent services... net stop wuauserv net stop bits net stop appidsvc net stop cryptsvc net stop ccmexec @echo 2. Checking if services were stopped successfully... sc query wuauserv | findstr /I /C:"STOPPED" if %errorlevel% NEQ 0 goto END sc query bits | findstr /I /C:"STOPPED" if %errorlevel% NEQ 0 goto END sc query appidsvc | findstr /I /C:"STOPPED" if %errorlevel% NEQ 0 sc query appidsvc | findstr /I /C:"OpenService FAILED 1060" if %errorlevel% NEQ 0 goto END sc query cryptsvc | findstr /I /C:"STOPPED" if %errorlevel% NEQ 0 goto END sc query ccmexec | findstr /I /C:"STOPPED" if %errorlevel% NEQ 0 sc query ccmexec | findstr /I /C:"OpenService FAILED 1060" if %errorlevel% NEQ 0 goto END @echo 3. Deleting AU cache folder and log file... del /f /q "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat" del /f /s /q %SystemRoot%\SoftwareDistribution\*.* del /f /s /q %SystemRoot%\system32\catroot2\*.* del /f /q %SystemRoot%\WindowsUpdate.log REM @echo 3. Renaming AU cache folder and log file... REM del /f /q "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat" REM ren %SystemRoot%\SoftwareDistribution *.bak REM ren %SystemRoot%\system32\catroot2 *.bak REM ren %SystemRoot%\WindowsUpdate.log *.bak REM sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) REM sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) @echo 4. Re-registering DLL files... cd /d %WinDir%\system32 regsvr32.exe /s atl.dll regsvr32.exe /s urlmon.dll regsvr32.exe /s mshtml.dll regsvr32.exe /s shdocvw.dll regsvr32.exe /s browseui.dll regsvr32.exe /s jscript.dll regsvr32.exe /s vbscript.dll regsvr32.exe /s scrrun.dll regsvr32.exe /s msxml.dll regsvr32.exe /s msxml3.dll regsvr32.exe /s msxml6.dll regsvr32.exe /s actxprxy.dll regsvr32.exe /s softpub.dll regsvr32.exe /s wintrust.dll regsvr32.exe /s dssenh.dll regsvr32.exe /s rsaenh.dll regsvr32.exe /s gpkcsp.dll regsvr32.exe /s sccbase.dll regsvr32.exe /s slbcsp.dll regsvr32.exe /s cryptdlg.dll regsvr32.exe /s oleaut32.dll regsvr32.exe /s ole32.dll regsvr32.exe /s shell32.dll regsvr32.exe /s initpki.dll regsvr32.exe /s wuapi.dll regsvr32.exe /s wuaueng.dll regsvr32.exe /s wuaueng1.dll regsvr32.exe /s wucltui.dll regsvr32.exe /s wups.dll regsvr32.exe /s wups2.dll regsvr32.exe /s wuweb.dll regsvr32.exe /s qmgr.dll regsvr32.exe /s qmgrprxy.dll regsvr32.exe /s wucltux.dll regsvr32.exe /s muweb.dll regsvr32.exe /s wuwebv.dll @echo 5. Removing WSUS Client Id... REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f @echo 6. Resetting Winsock and WinHTTP Proxy... netsh winsock reset proxycfg.exe -d netsh winhttp reset proxy @echo 7. Starting SMS Host Agent, Cryptographic Services, Application Identity, BITS, Windows Update services... net start ccmexec net start cryptsvc net start appidsvc net start bits net start wuauserv @echo 8. Deleting all BITS jobs... bitsadmin.exe /reset /allusers @echo 9. Forcing AU discovery... wuauclt /resetauthorization /detectnow :END
Ubuntu 底下安裝 Visual Studio Code
2017年1月4日 星期三
sudo wget -O - https://tagplus5.github.io/vscode-ppa/ubuntu/gpg.key | sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/vscode.list https://tagplus5.github.io/vscode-ppa/ubuntu/vscode.list
sudo apt update
sudo apt install code code-insiders
標籤:
Programming
[Ubuntu] 設定 scratch2 檔案關聯
2016年12月30日 星期五
資料來源:https://scratch.mit.edu/discuss/topic/187916/
1. define .sb2 file's type
sudo vi /usr/share/mime/package/***.xml
*** is new file's name. Set is as you like. ex)scratch2
write text below in the file
<?xml version=“1.0” encoding=“UTF-8”?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info“>
<mime-type type=”application/x-scratch2“>
<comment></comment>
<glob pattern=”*.sb2“/>
</mime-type>
</mime-info>
2. associate .sb2 file with scratch 2 application
Find ”edu.media.mit.scratch2editor.desktop" file under directory of /usr/share/applications/ ,
and add only one line in the last line of that desktop file.
MimeType=application/x-scratch2
3. update
sudo update-desktop-databese
sudo update-mime-database
4. change sb2 file's icon
sudo cp /opt/Scratch\ 2/share/icons/ProjectIcon48.png /usr/share/icons/gnome/scalable/mimetypes/application-x-scratch2.png
(參考:http://wiki.ubuntu.com.cn/UbuntuHelp:AddingMimeTypes)
5. 更新圖示cache
sudo gtk-update-icon-cache /usr/share/icons/gnome/ -f
4. reboot PC
[PHP] Composer 取消 SSL/TLS 連線
2016年12月19日 星期一
Composer 把安全性提高,要求 SSL/TLS 才能更新,不然就會出現錯誤訊息並中斷。
如果沒有辦法設定 SSL/TLS 連線的話,可以執行下列的指令,變更預設值讓 composer 可以先執行。
(註:正常上線環境 **建議** 不要取消 SSL/TLS 喔)
(註:正常上線環境 **建議** 不要取消 SSL/TLS 喔)
composer config -g -- disable-tls true
composer config -g -- secure-http false
標籤:
php,
Programming
訂閱:
文章 (Atom)


