setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck
執行以上的參數,會忽略檢查,即可解決此問題。
setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck
執行以上的參數,會忽略檢查,即可解決此問題。
LISTING 1: Logon Script to Automatically Install New Printers
On error resume next
' This code enumerates the user's current network printer connections.
Set WshNetwork = CreateObject("WScript.Network")
Set oPrinters = WshNetwork.EnumPrinterConnections
For j = 0 to oPrinters.Count - 1 Step 2
' This code opens a comma-delimited text file containing
' the corresponding old and new printers and assigns
' each line as an array variable.
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("C:\printers.txt", ForReading)
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
arrPrinterList = Split(strNextLine , ",")
' This section retrieves the registry value corresponding to the
' default printer and assigns the registry value as a string variable.
const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows"
strValueName = "Device"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
wscript.echo(strValue)
' This code takes both variables defined above and introduces conditional logic.
For i = 1 to Ubound(arrPrinterList)
If strValue =(arrPrinterList(0)) then
Wscript.Echo "Your default printer will be changed to: " & arrPrinterList(i)
WshNetwork.AddWindowsPrinterConnection arrPrinterList(i)
WshNetwork.SetDefaultPrinter arrPrinterList(i)
WshNetwork.RemovePrinterConnection arrPrinterList(0)
Else
If oPrinters.Item(j+1)=arrPrinterList(0) then
WshNetwork.RemovePrinterConnection arrPrinterList(0)
WshNetwork.AddWindowsPrinterConnection arrPrinterList(i)
End If
End If
wscript.sleep 15000
Next
Loop
Next
wscript.echo ""
其中上述的流程需修改的應該是c:\Printers.txt
\\oldserver\oldprinter,
\\newserver\newprinter
依照上述流程,儲存後,至用戶端執行即可完成變更,亦可透過AD進行派送完成結果。
cd /usr/ports/shells/bash
make install clean
再來請安裝Gnuls
cd /usr/ports/misc/gnuls/
make install clean
兩套軟體安裝完成後還需要修改兩個部份的資訊,請依照以下資訊修改
vi /etc/profile
alias ls="gnuls --color=auto --show-control-chars"
以及
chsh
Shell: /bin/tcsh <== 把 /bin/tcsh 改成 /usr/local/bin/bash
兩個部分修改完成,登出再登入,即可看到美麗的彩人生呢!!!
KERNCONF=I386 //指定要編譯的核心設定檔名稱
SUP_UPDATE=yes //自動呼叫 csup 更新
SUP=/usr/local/bin/csup //指定 csup 的程式路徑
SUPFLAGS=-L 2 //採用的 csup 參數
SUPHOST=cvsup.tw.FreeBSD.org //指定 csup 的主機網址
SUPFILE=/usr/share/examples/cvsup/stable-supfile
修改完成後執行以下指令
cd /usr/src
make update
此方式可以進行套件的下載,接下來需修改設定的核心資訊,
cd /usr/src/sys/i386/conf/
cp GENERIC MYKERNEL
vi MYKERNEL
新增以下訊息再KERNEL設定檔內
options IPFIREWALL
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_VERBOSE
修改後存檔,接下來要進行編譯,請使用以下指令
cd /usr/src
make buildkernel KERNCONF=MYKERNEL
make installkernel KERNCONF=MYKERNEL
安裝完成後,清除過程中產生的產物,
rm -rf /usr/obj/usr/src/sys/MYKERNEL
接下來重新開機,載入新的核心
sync ; sync ; sync ; reboot
code { display: block;
font-family: 'Courier New';
font-size: 9pt;
overflow: auto;
border: 1px solid #ccc;
padding: 10px 10px 10px 21px;
max-height: 180px;
line-height: 1.2em;
letter-spacing: 0px;
color: #000;
background: #ccc url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFxQ2eDuDYc2mlCXj7En2XWsEXU7UwSpgOVVsxt1dlABV2__1CbPauIBKgXCyeNa7KdugI0gjZCKv0geDtw_PsvwzE5L_t45PHD7b8QD7vuPjNAZyo5ReD0hUx9oWPJXMldec9RxikAg/) left top repeat-y;}
/etc/make.conf
將其內容新增為
SUP_UPDATE=yes
SUP=/usr/local/bin/csup //用於使用 Ports 安裝的路徑
SUP=/usr/bin/csup //用於 Base System 的路徑
SUPFLAGS=-L 2
SUPHOST=cvsup.tw.FreeBSD.org
PORTSSUPFILE=/usr/share/examples/cvsup/ports-supfile
回到shell底下執行以下的指令
cd /usr/ports/
make update
執行完成後,即可進行ports套件的更新