###前提・実現したいこと
Office2007のPowerpointファイルを右クリックから別のプロセスで起動するようレジストリを設定したいです。
ExcelとWordでは同様の事が出来ましたが、パワーポイントに対してのみ失敗します。
恐らく、新しいウィンドウで開く際の起動スイッチの設定が間違っているのではないかと思いますが、正しい値が検索しても見つけられませんでした。
実現したいのは、以下の動作です。
①Powerpointファイルを右クリックする。(ppt,pptx,pptm)
②右クリックのメニューから「新しいウィンドウで開く(&W)」を選ぶ。
(「新しいウィンドウで開く(&W)」はレジストリキーで作成しておく)
③既に開いているPowerpointとは別で新しいプロセスとしてPoworpointが起動し、選んだファイルが表示される。
バッチファイルにしたい理由は複数のPCに同じ設定を施したいからです。
###発生している問題・エラーメッセージ
実現したい事の②までは実現済み。 ③の段階で、既に開いているプロセス内でファイルが表示されてしまう。(普通に起動したときと変わらない) 「新しいウィンドウで開く(&W)」を指定したときの起動スイッチを以下で設定しているが、恐らくこれが間違っています。 しかし、正しい値が検討もつきません・・・。 "C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" "%1"
###該当のソースコード
set RegRoot=HKEY_CLASSES_ROOT @echo Excel ブック(xlsx) : Excel.Sheet.12 reg add "%RegRoot%\Excel.Sheet.12\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Excel.Sheet.12\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE\" \"%%1\"" /f @echo Excel 97-2003ブック(xls) : Excel.Sheet.8 reg add "%RegRoot%\Excel.Sheet.8\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Excel.Sheet.8\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE\" \"%%1\"" /f @echo CSV(カンマ区切り)(csv) : Excel.CSV reg add "%RegRoot%\Excel.CSV\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Excel.CSV\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE\" \"%%1\"" /f @echo Excel マクロ有効ブック(xlsm) : Excel.SheetMacroEnabled.12 reg add "%RegRoot%\Excel.SheetMacroEnabled.12\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Excel.SheetMacroEnabled.12\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\EXCEL.EXE\" \"%%1\"" /f @echo WORD ドキュメント(docx) : Word.Document.12 reg add "%RegRoot%\Word.Document.12\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Word.Document.12\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\WINWORD.EXE\" \"%%1\"" /f @echo WORD 97-2003ドキュメント(doc) : Word.Document.8 reg add "%RegRoot%\Word.Document.8\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\Word.Document.8\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\WINWORD.EXE\" \"%%1\"" /f REM↓↓↓↓↓↓↓【問題の箇所】↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ @echo POWERPOINT(pptx) : PowerPoint.Show.12 reg add "%RegRoot%\PowerPoint.Show.12\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\PowerPoint.Show.12\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE\" \"%%1\"" /f @echo POWERPOINT 97-2003形式(ppt) : PowerPoint.Show.8 reg add "%RegRoot%\PowerPoint.Show.8\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\PowerPoint.Show.8\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE\" \"%%1\"" /f @echo POWERPOINT マクロ有効ファイル(pptm) : PowerPoint.ShowMacroEnabled.12 reg add "%RegRoot%\PowerPoint.ShowMacroEnabled.12\shell\OpenWithNewWindows" /ve /t REG_SZ /d "新しいウィンドウで開く(&W)" /f reg add "%RegRoot%\PowerPoint.ShowMacroEnabled.12\shell\OpenWithNewWindows\command" /ve /t REG_SZ /d "\"C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE\" \"%%1\"" /f REM↑↑↑↑↑↑【ここまで】↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ pause
###試したこと
・googleで同じ事をしている人がいないか検索
・Openの値が"C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" "%1" である事から、おそらく同じ値では「別プロセス(別ウィンドウ)で開く」ようにはならないという事の確認。
###補足情報(環境)
Win7 pro
Office2007 32bit

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。