;インストーラー用スクリプト言語NSIS(http://nsis.sourceforge.net/)で ;ラグナロクオンラインのインストール先のディレクトリをレジストリから読み込むスクリプトです。 ;自作の支援ツールのインストーラーNSISを作るときに、ラグナロクオンラインのディレクトリに ;ファイルを置きたい場合などにご利用ください。 ;NSISでインストーラーを作成する場合は、HM NIS Edit(http://hmne.sourceforge.net/)を使うと便利です。 ;2008/01/02 by Logue(logue@hotmail.co.jp) ;-------------------------------- ; General Attributes Name "Get RagnarokOnline Installed Directory Test" OutFile "getROdir.exe" ShowInstDetails show ShowUnInstDetails show ;-------------------------------- ;Interface Settings !include "MUI.nsh" !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico" !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_LANGUAGE "Japanese" ;SetFont 14 ;RODIRを定義 var RODIR !define $RODIR RODIR ;ROのインストール先をレジストリから取得するマクロ !macro GET_RODIR Push $R0 ClearErrors ReadRegStr $R0 HKCU "Software\Gravity\RagnarokOnline" "RagPath" Exch $R0 Pop $R0 ;$RODIRに代入。 StrCpy $RODIR $R0 !macroend ;-------------------------------- ;Installer Sections Section "Dummy Section" SecDummy ; ラグナロクオンラインの設置ディレクトリを取得するマクロを呼び出す !insertmacro GET_RODIR DetailPrint "ラグナロクオンラインのインストール先:$RODIR" SectionEnd ;$RODIRを使用する場合、各セクションごとに!insertmacro GET_RODIRを入れる必要あり。