標籤

2020年11月20日 星期五

[系統]如何關閉Win10自動更新

 文章出處:http://www.ess.nthu.edu.tw/p/16-1351-152740.php?Lang=zh-tw
清華大學  工程與系統科學系暨研究所

自動一鍵關閉更新

網路上有人寫出快速進行以下設定的程式,若不放心也可以自行手動操作

手動關閉更新步驟

  1. Win鍵 + R,輸入  gpedit.msc 開啟群組原則編輯器,把[設定自動更新]跟[透過自動更新安裝建議的更新]停用



  2. 控制台\所有控制台項目\系統管理工具\電腦管理,找到 BITS 服務

  3. 停用該服務


  4. 去設定\更新與安全性



  5. 選擇進階選項\傳遞最佳化,關閉從其他電腦下載更新






2020年11月6日 星期五

SQL恢復[正在還原]資料庫

 -- 切換資料庫的狀態為:ONLINE。

RESTORE DATABASE [資料庫名稱] WITH RECOVERY GO

2020年10月29日 星期四

Robocopy常用方法說明

/E :: 複製子目錄,包括空的子目錄。
/XO :: 排除較舊的檔案。
/PURGE :: 刪除來源已經不存在的目的地檔案/目錄。

/MIR :: 鏡像樹狀目錄 (相當於 /E 加 /PURGE)。
/DCOPY:T :: 複製目錄時間戳記。加了目錄的時間就跟來源的時間是一樣的
/SEC :: 複製包含安全性的檔案 (相當於 /COPY:DATS)。非本機磁碟,好像會出現存取被拒
/XO :: 排除較舊的檔案。
/XF file [file]... :: 排除符合指定名稱/路徑/萬用字元的檔案。Thumbs.db 會自動產生,之前有遇過卡住,就忽略囉
/MT[:n] :: 以 n 個執行緒執行多執行緒複製 (預設值為 8)。這個我沒用,新版才有的功能


/COPYALL:Copy ALL file info (equivalent to /COPY:DATSOU)
/B:Copy files in Backup mode
/SEC:Copy files with SECurity (equivalent to /COPY:DATS)
/MIR:MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E)
/R:Number of Retries on failed copies - default is 1 million
/W:Wait time between retries - default is 30 seconds
/LOG+:Output status to LOG file (append to existing log)
/NP:No Progress - don't display % copied(不加會顯示複製進度 %)
/NFL:No File List - don't log file names(不加會把所有的檔案列出)
/NDL: No File List - don't log file names(不加會把所有的目錄列出)

我的主要目的是要做資料備份,使用的語法如下:
robocopy D:DATA S:資料區 /COPYALL /B /SEC /MIR /R:0 /W:0 /LOG+:DataCopy.log /NP /NFL /NDL

下面有詳細說明

D槽變成OEM分割 原本的D槽消失,該如何還原?

Windows 7將D槽變成OEM分割 原本的D槽消失了

進到電腦管理裡去看

發現D槽變成OEM磁碟區而且完全無法對它做任何動作

解決方法


(1)用附屬應用程式內的命令提示字元 (cmd)

(2)輸入diskpart

(3) list disk 查出你要的磁碟之後 假設是磁碟0 那就 select disk 0

(2) list partition 查出是哪一個磁區 假設是磁碟分割2 那就 select partition 2

(3) 最後 set id=07 

消失的D槽變回來了

2020年8月5日 星期三

如何內容合併到同一個儲存格? 應用 Excel-PHONETIC函數的



這是一個特殊的函數,原始用法是用來從文字字串中抽選注音標示 (假名註解) 字元,假名指的是「日文片假名」,語法如下:

=PHONETIC(reference)

reference 必要。這是文字字串或是對包含假名註解文字字串之單一儲存格或儲存格範圍的參照。
如果 reference 是特定範圍的儲存格,會傳回在左上方範圍之儲存格內的假名註解文字字串。
如果 reference 是特定範圍的非相鄰儲存格,則會傳回 #N/A 錯誤值。
我們這邊要用來處理下面的例子,假設我們要將組別、組長、表演內容合併到同一個儲存格,不用 CONCATENATE 或 &,輸入「=PHONETIC」。


然後選擇所有儲存格,完整寫法是:

=PHONETIC(A2:C6)



最後來看一下跟其他方式的比較:

函數 CONCATENATE
= CONCATENATE(A2,A3,A4,A5,A6,B2,B3,B4,B5,B6,C2,C3,C4,C5,C6)

符號 &
= A2&A3&A4&A5&A6&B2&B3&B4&B5&B6&C2&C3&C4&C5&C6

函數 PHONETIC
=PHONETIC(A2:C6)

誰比較快,一看就懂。

2020年6月25日 星期四

Windows 建立使用者

簡易的新增一使用者 並設定相關密碼
net user test 123 /add 新增使用者test 密碼 123
net user test * /add 新增使用者test 並於下次登入後輸入密碼

參考以下文章

Options for the Net User Command

  • /active:{yes | no}
    Activates or deactivates the account. If the account is not active, the user cannot gain access to the server. The default is yes.
  • /comment:"text"
    Provides a descriptive comment about the user's account (maximum of 48 characters). Be sure to put quotation marks around the text you use.
  • /countrycode:nnn
    Uses the operating system country code to implement the specified language files for a user's help and error messages. A value of 0 signifies the default country code.
  • /expires:{date | never}
    Causes the account to expire if date is set. The never option sets no time limit on the account. An expiration date is in the form mm/dd/yy or dd/mm/yy, depending on the country code. Months can be a number, spelled out, or abbreviated with three letters. Year can be two or four numbers. Use slashes (/) with no spaces to separate parts of the date.
  • /fullname:"name"
    Is a user's full name (rather than a user name). Enclose the name in quotation marks.
  • /homedir:pathname
    Sets the path for the user's home directory. The path must exist.
  • /passwordchg:{yes | no}
    Specifies whether users can change their own password. The default is yes.
  • /passwordreq:{yes | no}
    Specifies whether a user account must have a password. The default is yes.
  • /profilepath[:path]
    Sets a path for the user's logon profile.
  • /scriptpath:pathname
    Is the location of the user's logon script.
  • /times:{times | all}
    Is the logon hours. The times option is expressed as day[-day][,day[-day]],time[-time][,time [-time]], and is limited to 1-hour increments. Days can be spelled out or abbreviated. Hours can be 12-hour or 24-hour notation. For 12-hour notation, use am, pm, a.m., or p.m. The all option specifies that a user can always log on, and a blank value specifies that a user can never log on. Separate day and time entries with a comma, and separate multiple day and time entries with a semicolon.
  • /usercomment:"text"
    Lets an administrator add or change the user comment for the account.
  • /workstations:{computername[,...] | *}
    Lists as many as eight computers from which a user can log on to the network. If the /workstations option has no list or if the list is *, the user can log on from any computer.
  • net help user | more
    Displays Help one screen at a time.

NOTE: You can obtain all of the information contained in this article by typing the following command:  net help user


例子
建立使用者
echo ********************************
echo 配合/EXPIRES:NEVER成立
echo 需要修改本機安全性設定
echo ********************************
net accounts /maxpwage:unlimited

echo ********************************
echo 刪除使用者
echo ********************************
net user  UserName /delete

echo ********************************
echo 建立使用者
echo ********************************
net user UserName PassWord /PASSWORDCHG:NO /expires:Never /COMMENT:"描述" /add

echo ********************************
echo 新增使用者到Administrators群組
echo ********************************
net localgroup Administrators  UserName /add

echo ********************************
echo 配合/EXPIRES:NEVER成立
echo 需要修改本機安全性設定
echo ********************************
WMIC USERACCOUNT WHERE "Name='UserName '" SET PasswordExpires=FALSE



2020年6月19日 星期五

印表機設定完整移機封裝還原方法

文章來源:https://a7432186.pixnet.net/blog/post/252300361


備份

開始>控制台>系統管理工具>列印管理>匯出成檔案



接下來一直按下一步直到還原完成就可完成印表安裝、設定轉移


智慧型應用程式控制

現象: 解法