Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top