(PuTTYユーザマニュアル) 4.26 設定をファイルに保存する - 4.26 Storing configuration in a file

http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter4.html#config-fileの日本語訳。<< 4.25 シリアル・パネル - 目次に戻る - 5章: PSCPを使ってファイルを安全に転送する >>

訳文

今のところ、PuTTYの設定の保存先としてレジストリの代わりにファイルを使うことはできません。しかし、バッチファイルを利用すれば、設定をファイルに保存できます。

PuTTY does not currently support storing its configuration in a file instead of the Registry. However, you can work around this with a couple of batch files.

(例えば)PUTTY.BATという名前のファイルが必要です。このPUTTY.BATでは、ファイルの内容をレジストリにインポートし、PuTTYを起動し、レジストリの内容をファイルにエクスポートし、レジストリエントリを削除します。Regeditのコマンドラインオプションを使用すれば、全て自動的に行えます。以下がPUTTY.BATに必要な内容です。

You will need a file called (say) PUTTY.BAT which imports the contents of a file into the Registry, then runs PuTTY, exports the contents of the Registry back into the file, and deletes the Registry entries. This can all be done using the Regedit command line options, so it's all automatic. Here is what you need in PUTTY.BAT:

@ECHO OFF
regedit /s putty.reg
regedit /s puttyrnd.reg
start /w putty.exe
regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy new.reg putty.reg
del new.reg
regedit /s puttydel.reg

このバッチファイルには、補助的なファイルが二つ必要です。それは、ランダムシードファイルPUTTY.RNDの初期保存場所を指定するPUTTYRND.REGと、設定をファイルに保存した後にレジストリの内容をクリアするためのPUTTYDEL.REGです。

This batch file needs two auxiliary files: PUTTYRND.REG which sets up an initial safe location for the PUTTY.RND random seed file, and PUTTYDEL.REG which destroys everything in the Registry once it's been successfully saved back to the file.

以下がPUTTYDEL.REGです。

Here is PUTTYDEL.REG:

REGEDIT4
 
[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]

以下がファイルPUTTYRND.REGの例です。

Here is an example PUTTYRND.REG file:

REGEDIT4
 
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
"RandSeedFile"="a:\\putty.rnd"

a:\putty.rndは、乱数データを保存する場所に置き換えてください。目的がPuTTYとその設定をフロッピーで持ち運ぶことであれば、乱数データはおそらくフロッピーに保存するでしょう。

You should replace a:\putty.rnd with the location where you want to store your random number data. If the aim is to carry around PuTTY and its settings on one floppy, you probably want to store it on the floppy.

<< 4.25 シリアル・パネル - 目次に戻る - 5章: PSCPを使ってファイルを安全に転送する >>