2017年3月29日 星期三

開啟TEST MODE

如標題

OTM.cmd
@echo off
diskpart /s diskpart_script_otm.txt
cd \EFI\Microsoft\Boot
bcdedit /store .\BCD /set {default} testsigning on

diskpart_script_otm.txt
sel vol c
sel part 1
list part
assign letter=s
exit

P.S: diskpart 由於算特殊指令  需要將 diskpart 裡面想下的指令打好成文字檔
     再去使用 diskpart /s  呼叫

2017年3月22日 星期三

好用的修復usb

推個網站給下載
可拿來做開機修復的USB
以下
https://goo.gl/rqdsAq


另外
原本是要來修記憶卡的
但直接宣告死亡..

dism 指令

Dism /Get-imageInfo /imagefile:E:\sources\install.wim
Dism /apply-image /imagefile:E:\install.swm /swmfile:E:\install*.swm /index:1 /applydir:C:\
整天搞這兩指令就飽了
好難弄.....
參考用法來源 : http://durphy.lofter.com/post/3b5fac_747749e

2017年3月13日 星期一

好用的 cmd 指令 (01)

最近在工作上有接觸 cmd 指令
這邊記一下好用的東西
========================================================
if + findstr using
========================================================
findstr "string" file
if errorlevel 1 (
    echo String NOT found...
) else (
    echo String found
)
========================================================
Example for findstr
========================================================
F:\test>findstr /v "black white" blackwhite.txt

red
blue

========================================================
F:\test>findstr "black white" blackwhite.txt

black
white
black white
black and white

========================================================
F:\test>findstr /c:"black white" blackwhite.txt

black white

========================================================
F:\test>findstr "white" blackwhite.txt | findstr "black"

black white
black and white

========================================================
findstr + errorlevel code
========================================================
findstr /C:FFFF info_1.hex
IF ERRORLEVEL 1 goto NOT_MATCH
echo MATCH
goto END

2017年3月12日 星期日

2017.03 近況

是說

剛剛看了一下
距離我上一次發文使用這個
已經大概是4年前了吧XD
而且那個時候還算是一個滿腔熱血的高中還是大學生
想到就來使用看看的狀況
到現在已經是每天等放假的上班族
時間真的過得很快...
之後應該會在這跟巴哈小屋更新有關小說的計畫
算是重新啟動吧
大概就是這樣啦~