Using VS.NET 2003, VB.Net, MSDE...
I have had a .NET .VB file get trashed for no reason (maybe hard disk
problem), so in addition to normal back ups, I want to automatically copy
these .vb code files to a back up location each time I use .Net. A batch
file seems the best way to do this (any other ideas?).
Question 1) Is there a way to execute a simple DOS batch file when VS.NET is
started or quit (or when a specific solution is opened/closed) ? I believe
the answer is no.
Question 2) Is there any reason that you cannot start vs.net from a batch
file by simply copying its shortcut Target from it properties to the batch
file? This is a line like:
"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe"
This seems to work OK, but leaves the DOS/Command window open.
Question 3) If I have a project named Solution, and back up via xcopy in a
batch file C:\Solution and all its sub directories, if some or all files are
trashed, is the back up enough to recover the solution? I believe the
answer is yes, but am concerned their might be some file(s) kept elsewhere
that are needed.
Thanks!
Bob Day
Peter Macej - 05 Aug 2004 20:47 GMT
> Question 1) Is there a way to execute a simple DOS batch file when VS.NET is
> started or quit (or when a specific solution is opened/closed) ? I believe
> the answer is no.
Running BAT can be easily accomplished by simple macro. See
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_2102
7701.html
To automatically run this macro at VS startup, see
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&threadm=s0s8%23qRBDH
A.2556%40cpmsftngxa06.phx.gbl&rnum=2&prev=/groups%3Fsourceid%3Dmozclient%26ie%3D
utf-8%26oe%3Dutf-8%26q%3Dvs%2B.net%2Bmacro%2Bstartup
> Question 2) Is there any reason that you cannot start vs.net from a batch
> file by simply copying its shortcut Target from it properties to the batch
> file? This is a line like:
> "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe"
> This seems to work OK, but leaves the DOS/Command window open.
In your BAT use
start "C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv.exe"
instead of simple
"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe"

Signature
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
.NET and ASP .NET code