How to restart PC and then automatically run a vbs script generated by Matlab before restart?

조회 수: 2 (최근 30일)
How to restart PC and then automatically run a vbs script generated by Matlab before restart?
I have a matlab script that if certain requirment was meet, it will generate a *.vbs script to a folder.
Next matlab will run "system('shutdown /r')" to restart my PC.
However, I want my PC aotomatically run specifically that generated vbs file.
How can I do it?(By windows task scheduler or other possible ways)

채택된 답변

Guillaume
Guillaume 2017년 5월 5일
This is not really a matlab question since you'll have to delegate to the OS for that.
You could use schtasks, or use COM to talk directly to the task scheduler. A vbsript example is here.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by