<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ktrito33</author_name>
  <author_url>https://blog.hatena.ne.jp/ktrito33/</author_url>
  <blog_title>怠日記</blog_title>
  <blog_url>https://nmk365.hatenablog.jp/</blog_url>
  <categories>
    <anon>VBScript</anon>
  </categories>
  <description>スクリプトの処理中に、同じスクリプトを起動されたくないケースがある。多重起動を禁止するにはどうすれば良いのか。概要WMI （Windows の管理データ）の Win32_Process で Windows 上のプロセスを確認できる。この Win32_Process より自分自身のスクリプト名を実行しているプロセスを取得することで、多重起動を禁止できる。参考→ Win32_Process クラスコードサンプル以下は自身と同じスクリプト名を実行しているプロセスを取得し、結果が複数だった場合にそのプロセス情報を出力するコード。Option Explicit ​ '自分自身が wscript.exe …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnmk365.hatenablog.jp%2Fentry%2F20240718%2F1721255400&quot; title=&quot;VBScript - 多重起動を禁止する（WMI利用） - 怠日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-07-18 07:30:00</published>
  <title>VBScript - 多重起動を禁止する（WMI利用）</title>
  <type>rich</type>
  <url>https://nmk365.hatenablog.jp/entry/20240718/1721255400</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
