0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mayaScannerをbat処理したい

Last updated at Posted at 2021-10-14

最近めっきり増えてきた mayaのデータに取り付くタイプのマルウェア。
mayaScannerによってファイルopen/import時に何とか対応してくれるのですが、
数が多いとどうにもダイアログが鬱陶しい。

何とか一気にスキャンできないものかと調べたところ

なるほど mayaBatch.exe でファイルを開けばmayaScannerが走ってくれるのか。

"C:\Program Files\Autodesk\Maya2019\bin\mayabatch.exe" -file "hogehoge.ma" -command "evalDeferred (""loadPlugin MayaScanner; MayaScan;"")"

実行して、マルウェアがhitすると問答無用で除去して、問答無用でファイルを上書きする。

ただ毎回書いて処理するのも面倒なので、複数ファイルを一気に処理したい & ドラッグアンドドロップで処理したい

for %%f in (%*) do (
"C:\Program Files\Autodesk\Maya2019\bin\mayabatch.exe" -file %%f -command "evalDeferred (""loadPlugin MayaScanner; MayaScan;"")"
)

※実際はさらに案件ごとのuserSetup.pyを読み込ませてます。
これを .batで保存してそこにファイルをドラッグアンドドロップすれば一気に処理ができる。

ただし先述の通り、
マルウェアがhitすると問答無用で除去して、問答無用でファイルを上書きするので、
オリジナルのファイルはどこかに逃がしておいた方が良さそう。

参考:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?