Prev | Current Page 464 | Next

John Paul Mueller

"Administering Windows Server 2008 Server Core"

In many cases, it??™s part personal preference and part skill or special need. For example,
at one time some people tried to use spreadsheets in place of word processors (it really was common
in the 1980s). However, anyone who has used both products today knows that each tool has a particular
job to perform and it??™s better to use the right tool for the job. The same rule applies to scripts versus
batch files. You might be able to use batch files to meet most of your needs, but eventually, you??™ll run
into a complex task that simply requires a script to perform adequately.
TESTING SCRIPTS 185
// If the user doesn??™t want to continue, display help and exit.
// Use an exit code of 2 to indicate a data entry error.
if (Answer.toUpperCase() == ???N???)
{
WScript.Echo(???Usage: MapNetwork \n???);
WScript.Quit(2);
}
// Input the drive letter.
WScript.Echo(???Type the local drive letter (X:).???);
DriveLtr = WScript.StdIn.ReadLine();
// Input the UNC drive on the remote machine.
WScript.Echo(???Type the UNC location (\\MyServer\MyDrive).???);
UNCName = WScript.StdIn.ReadLine();
}
else
{
// Obtain the required inputs from the command line.


Pages:
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
zakłady bukmacherskie Wczasy nad morzem oferty spa Spa Ciechocinek kolokacja rack