顯示具有 WIndows 標籤的文章。 顯示所有文章
顯示具有 WIndows 標籤的文章。 顯示所有文章

2017年6月19日 星期一

Windows server local polocy



STEP:

To open the Local Group Policy Editor from the command line

  • Click Start , type gpedit.msc in the Start Search box, and then press ENTER .

Note:

這裡值得特別一提的就是 強制執行密碼原則 (Enforce password policy),當勾選的時候,該 SQL Server 帳戶就會使用本機安全性原則的「帳戶鎖定原則」去限制帳戶登入的次數與鎖定的時間,如下圖所示:
所以,就算你的 sa 帳戶被鎖定,其實你可以慢慢等 15 分鐘,該帳號就可以重新嘗試登入了!(當然,如果連密碼都忘記的話,那就用上述的解法吧!)


Reference: 

2016年8月10日 星期三

windows Regedit File Command add / delete



Using the reg command
Action: add, delete

If delete:

reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f




From REF
修改(包括新增)登錄檔。範例:
reg add "HKCU\Keyboard Layout\Toggle" /v "Layout Hotkey" /d "2" /t REG_SZ /f
HKCU 是 HKEY_CURRENT_USER 的縮寫。
/v 後面寫:regedit 登錄編輯程式右半邊視窗登錄檔條目的名稱。
/d 後面寫:regedit 登錄編輯程式右半邊視窗登錄檔條目的數值。
/t 後面寫:regedit 登錄編輯程式右半邊視窗登錄檔條目的類型。如果你不知道你要修改的登錄檔是什麼類型,就到登錄編輯程式右半邊視窗那裡看一下,常見的有 REG_SZ、REG_DWORD。



2016年7月20日 星期三

VBS parameter space especialy using path


Solution:
Using the chr(34) and eval to run the command like linux eval run raw command


Example:
 strCommand =
 "%comspec% /c move %USERPROFILE%\IE11Doc.bat  %USERPROFILE%\" & chr(34) & "A BC" & chr(34)

#comspec is the exec, /c is close message, chr(34) mean qute

Wscript.Echo  strCommand
# the content will be presented %comspec% /c move  %userprofile%\IE11Doc.bat  %userprofile%\"A BC"

oShell.Run  strCommand, 0, True
# equal eval and runit, notice not using the run(...) no ( )


Noteice:
' K and run osrun/1 is show content for debug, convesty is  /c and 0 is no message

WIndow 自動啟動程式地方

Position 
1. 
C:\Users\使用者帳號\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup


2. 
上圖為 Windows 7 左下角「開始」鍵打開後的搜尋框,請直接輸入「msconfig」並按下 ENTER 即可。




REF