What programming language is most appropriate for this task?
Hello Programmers of the FRC:F! I need your advice.
About two weeks ago, I was hired as part of the IT department in the College of Engineering and Computer Sciences at my university. We have quite a few computerlabs and when a computer or lab needs to be re-done we use Symantec Ghost over the network to re-image the machine(s). However, if a machine can't boot into windows, we have to use a custom configured flash drive that will boot a free-running version of the ghost client that is configured with the proper NIC driver. We had more than 30 flash drives, each being only 1 of 5 or 6 different configurations for different nics.
I thought this was stupid, so I figured out how to make a multiboot flash drive that held images of all the different configs and used grub to allow a tech to select the proper version for that particular NIC. This eliminated the need to fish around for the right usb drive.
Now that the product is done, I need a way to duplicate these easily. I wanted to image the drive, but imaging didn't carry the bootability.
Here is what I need:
The tech runs the program and the program asks for the letter of the drive to be made into the multiboot drive.
the program then asks to confirm.
The program formats the drive to fat32 using windows' built in formatting utility, using the inputed drive letter as an argument.
The program runs the "make it bootable with grub" program, using the inputed drive letter as an argument.
The program copies all the files over to the drive, preserving directory structure.
Confirmation is provided stating the process is complete.
I tried writing this as a windows batch file, but there really isn't a way to accept a string with batch files.
This program doesn't need a fancy UI, it can be just a command line interface, but it has to be able to run without an interpreter (i.e. Python).
So what programming language should I use to accomplish my goal?
EDIT: And please don't tell me to get a USB duplicator. I've only been here two weeks, I can't requisition something that expensive.
Comments
Assembly!
It would only take very basic C to do what you need, though, so it's worth considering, for the sake of niceness and learning.
EDIT: Name one. You're already using GRUB remember?
Again, name one problem with multiple partitions on a USB stick. I really do wonder what problems you know of. But if all you meant with "It's not optimal" that oh dear a minor amount of storage space is lost for keeping track of the multiple partitions, then you have no real argument.
So then. C? Basic? Visual Basic?
Oh, and in windows 2000 and later shell (cmd.exe) you actually can prompt for data easily. The "set" command can be used to prompt and read a string into an environment variable. For example,
set /p mydrivevar="Enter drive name: "
would prompt with "Enter drive name: " and wait for user input. Any string typed will be placed in the mydrivevar environment variable which can be accessed in the script with %mydrivevar%. The windows cmd shell is not nearly as easy or flexible as unix shells, but it is usable with a bit of research. Note that the quotes are needed to put a space after the ':', and will not be printed with the prompt.If you really don't want to use the shell, then at least stick to the realm of scripting languages. Even on windows there are scripting environments available by default, though I have never really used them. Windows 7 includes the power shell, older versions of windows have the scripting host that uses vbscript/jscript. (I assume that "run without an interpreter" == "run on a windows without installing a new interpreter"?)