Question:
how would I create simple scripts or programs to save time on my computer?
charchar88
2009-03-12 18:45:01 UTC
For example here are some programs I would like to create.

Something that can install all the programs I want on my computer when I do a clean re-install of windows. For example, instead of having to spend an entire day installing and clicking and installing ect. is there a script or answer file I could create? What language?

Also something that can convert a group of files into another file type (ex: word to pdf, or chm to pdf, avi to mpeg, ect.) Instead of having to convert each individual file at a time manually using a program that could take an hour or more.

I'm an intermediate in C++ and getting there with Java and C# also, just started learning PHP, html, Javascript ect this year and I eventually plan to pick up perl and python once I master these other ones. That should give me plenty of options to program or script what I want. Anyone know where to start or have advice? 10 points to anyone who can help or just answer.
Five answers:
Mooga
2009-03-12 18:49:37 UTC
You can use a batch script.

Most executable have an quite or silent install mode. /q might work.
Shadow Wolf
2009-03-13 02:37:03 UTC
If you know all the programs you want to install for every clean install, do a fresh clean install and then create an image. Depending on how large the image is you may be able to burn it to DVD or CD. If it is much larger, I suggest ghosting it to a second hard drive.



To restore your clean image, you copy it or ghost it back.



No need for programming languages or scripting.



An alternative would be to get a hard drive large enough to hold the image. Boot using a Linux Live CD then copy the hard drive image using dd or other imaging software. You can restore the image by reversing the process.



Sadly, many of the program install systems don't allow much room for automated installs. Scripting this would be really tedious as you'd have to program mouse clicks and possibly text answers.



Updating your image is as easy as installing a fresh clean image, making the changes on the system, then copy the new image.



I know it isn't what you asked for, but there is an easy way and there is the hard way. I think you'll find my way easier.



Shadow Wolf
Matt Flaschen
2009-03-13 01:56:05 UTC
It's hard to give a general answer to this, so I'll try to break it down. While it is easy to setup a preferred installation config on free OS's (see e.g. Kickstart at http://fedoraproject.org/wiki/Anaconda/Kickstart ), Windows makes it more difficult. You have to either use slipstreaming ( http://en.wikipedia.org/wiki/Slipstream_ (computing)) or use a separate script once the OS is installed. The problem is only some installers are scriptable. For others you would need to use reverse-engineering (e.g. cabextract, etc.) or some kind of GUI driver (to automatically click the needed buttons).



As far as converting files, this shouldn't be that hard, though it obviously depends what you're trying to convert to what. It's best to be more concrete.



Also I agree with colanth that a fundamental understanding of how computers and programming works is more useful than cramming as many languages as you can. That will come naturally (well, mostly) later.
anonymous
2009-03-13 01:53:57 UTC
You could also throw those into a .zip or .rar file and upload them to the internet (email, website, etc..). And when you have your OS back up and running, just download the .zip/rar, and unzip them. It would save a great deal of time. But it's also a possibility that I'm not following your question correctly.
anonymous
2009-03-13 01:55:07 UTC
You're learning a lot of languages, but it sounds as if you've never learned programming. That's like a carpenter learning "hammer" without knowing how to build a house. Try http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf before you learn more languages that you don't know how to apply to problems.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...