2

How can I invoke a Developer Command Prompt that comes with Visual Studio 2013 and execute my peverify commands in it from a python script. I am using python 3.4. I was able to execute commands in windows command prompt using subprocess but dont know how to do so from Developer Command Prompt.

Please help me out.My aim is to execute peverify command through a set of files in a given directory.

1

2 Answers 2

-1

I guess all you need is simply start

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"" 
Sign up to request clarification or add additional context in comments.

1 Comment

Yes..you are right. But how to get it done via python??
-1

Here's one of the many ways to call it.

from subprocess import call call(%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"", shell=True) 

It can also be done with os.system() and quite a few others from subprocess depending on your needs.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.