おはようございます、
私が取り組んでいるプロジェクトにアプローチする方法を見つけようとしている問題があります...
基本的に何が起こっているかというと、テキスト ファイルに移動し、特定のテキスト文字列 (IE ColumnSeparator=Y) を探して、それを ColumnSeparator=N に変更する必要があります。
「ColumnSeparator=Y/N」が存在しない場合、テキストのセクションをファイルに追加するために、4 ~ 5 行のテキストを書き込む必要があります。追記で大丈夫です。
さて、これはトリッキーな部分です。私が編集しているこのファイルは、〜 850 台のマシンで使用されるプログラムのファイルの構成であり、すべてのファイルは少し異なり、Windows XP と Windows 7 によって、2 つの異なる場所にあります。
Windows 7 では次の場所にありますC:\AS400\s10138fd.ws
が、Windows XP では次の場所にあります。C:\Program Files\IBM\Client Access\Emulator\Private\AS400.ws
何か案は??
ありがとう!!
編集する必要がある *.ws ファイル情報は次のとおりです。
[Profile]
ID=WS
Description=
Version=9
[Translation]
IBMDefaultView=Y
DefaultView=
IBMDefaultDBCS=Y
DefaultDBCS=
[Communication]
AutoConnect=Y
Link=telnet5250
Session=5250
ForceConfigPanel=N
[Telnet5250]
HostName=S10138fd
Security=Y
HostPortNumber=992
SSLClientAuthentication=Y
CertSelection=AUTOSELECT
AutoReconnect=Y
[5250]
HostCodePage=037-U
PrinterType=IBM3812
[Keyboard]
CuaKeyboard=2
Language=United-States
IBMDefaultKeyboard=N
DefaultKeyboard=C:\AS400\AS400.KMP
[LastExitView]
A=4 1335 -14 896 609 3 13 29 400 0 IBM3270� 37
追加する必要があります:
[Window]
ViewFlags=CE00
RuleLinePos=0 0
ColumnSeparator=N
新しいスクリプトは次のとおりです。
if exist "c:\as400\s10138fd.ws" (cd \as400)
copy s10138fd.ws temp.ws
echo [Window]>s10138fd.ws
echo ViewFlags=CE00>>s10138fd.ws
echo RuleLinePos=0 0>>s10138fd.ws
echo ColumnSeparator=N>>s10138fd.ws
type temp.ws >>s10138fd.ws
del temp.ws
) ELSE (cd\program files\ibm\client access\emulator\private)
copy as400.ws temp.ws
echo [Window]>as400.ws
echo ViewFlags=CE00>>as400.ws
echo RuleLinePos=0 0>>as400.ws
echo ColumnSeparator=N>>as400.ws
type temp.ws >>as400.ws
del temp.ws
)
pause