Welcome to Dream.In.Code
Become an Expert!

Join 149,575 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,694 people online right now. Registration is fast and FREE... Join Now!




Batch Programming

 
Reply to this topicStart new topic

Batch Programming, Is the syntax correct?

marcells23
8 Oct, 2007 - 01:58 PM
Post #1

D.I.C Head
Group Icon

Joined: 22 Aug, 2007
Posts: 139



Thanked: 3 times
Dream Kudos: 125
My Contributions
I wrote this batch file for use in active directory and it seems to work fine, but i wanted to make sure that if the first if statement is false, it should go to the next if statement without the use of an else statement right?? my manager thinks that it will still continue to run even after the exit command..i just need to make sure im correct before I go back and say anything.
CODE

if exist C:\Program Files\Symantec\pcAnywhere\awhost32.exe (
    copy \\CRDATA\DEPLOY\PCAhost\pca.pca.cif c:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.pca.cif
    copy \\CRDATA\DEPLOY\PCAhost\pca.bhf c:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.bhf
    regedit /s \\CRDATA\DEPLOY\PCAhost\reg\CautostartPCA.reg
    exit

)

if exist D:\Program Files\Symantec\pcAnywhere\awhost32.exe (
    copy \\CRDATA\DEPLOY\PCAhost\pca.pca.cif D:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.pca.cif
    copy \\CRDATA\DEPLOY\PCAhost\pca.bhf D:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.bhf
    regedit /s \\CRDATA\DEPLOY\PCAhost\reg\DautostartPCA.reg
    exit

)
if exist E:\Program Files\Symantec\pcAnywhere\awhost32.exe (
    copy \\CRDATA\DEPLOY\PCAhost\pca.pca.cif E:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.pca.cif
    copy \\CRDATA\DEPLOY\PCAhost\pca.bhf E:\Docume~1\AllUse~1\Applic~1\Symantec\pcAnyw~1\Hosts\pca.bhf
    regedit /s \\CRDATA\DEPLOY\PCAhost\reg\EautostartPCA.reg
    exit

)

User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Batch Programming
10 Oct, 2007 - 06:33 AM
Post #2

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,026



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
QUOTE
my manager thinks that it will still continue to run even after the exit command

He is wrong.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 10:30PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month