1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim lRet&
    lRet = Shell("cmd /k devenv m:\myproject.sln /build Release", 1)

End Sub

This fails with the command line saying "devenv" is misspelt or not found.

Does anybody know why?

4

1 回答 1

0

I ran all "bat" files that I could find in the VC programs directory. First I started them not as as admin, and it did not work. When I started the bats as an admin, the command would finally work. Also I had to move to the VS path using CD.

于 2013-03-29T14:20:54.193 回答