Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / August 2004

Tip: Looking for answers? Try searching our database.

Batch file with vs.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Day - 03 Aug 2004 17:00 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.