-1

.. with Arguments
I want the Batch file to open its own Console and close it when its finished

os.startfile(path, param)
>> WindowsError: [Error 1155] No application is associated with the specified file for this operation:
Tensei
  • 11
  • 3

1 Answers1

0

Change the file from *.bat to *.cmd. I've had issues executing *.bat files before that were resolved by making it a *.cmd file. In your case, the problem has to do with what executable your system has associated with the *.bat extension. In particular, Python can't find any association (even though it should be cmd.exe).

The differences between the two file types are subtle and pretty well explored in this SO question.

Community
  • 1
  • 1
skrrgwasme
  • 9,358
  • 11
  • 54
  • 84