<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anya0w0</author_name>
  <author_url>https://blog.hatena.ne.jp/anya0w0/</author_url>
  <blog_title>あにゃろぐ</blog_title>
  <blog_url>https://anya0w0.com/</blog_url>
  <categories>
    <anon>バッチファイル</anon>
    <anon>Windows</anon>
    <anon>tech_tips</anon>
  </categories>
  <description>タイトルの通りです。 既存のバッチファイル(.bat)が新規構築したサーバ上で問題なく稼働することを確認するために、バッチ実行してリターンコードを確認したかったのですが、バッチの処理終了時にコマンドプロンプトの画面が閉じてしまい、リターンコードを取得できず困っていました。 バッチファイルを修正し「exit /b N」とexitすれば解決なのですが、バッチファイルは既存流用の方針のため、ソース修正はしたくない。 やりたいこと 問題点 原因 制約 対応策 やりたいこと バッチファイルを実行し、リターンコードを取得したい。 問題点 バッチファイルの実行が完了するとコマンドプロンプトの画面が閉じてしま…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanya0w0.com%2Fentry%2F2024%2F11%2F01%2Fbatchfile_get_rtncd&quot; title=&quot;処理終了時に画面が閉じてしまうバッチファイルのリターンコードを取得する - あにゃろぐ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://m.media-amazon.com/images/I/51rMSs27BXL._SL500_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-11-01 07:00:00</published>
  <title>処理終了時に画面が閉じてしまうバッチファイルのリターンコードを取得する</title>
  <type>rich</type>
  <url>https://anya0w0.com/entry/2024/11/01/batchfile_get_rtncd</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
