View Full Version : executable file to copy TS3 program files
09-18-2011, 08:18 AM
I am using TeamSpeak3 for my organization and currently have my members download and copy over some "sound theme" files into their program files/teamspeak3 client/sound folder, along with a few other file changes, but this is becoming a problem. Some members are just not able to copy over the program files and it is taking up a ton of time. What I need is a .exe or some sort of other file that can do the following;
Move a folder into their program files/teamspeak3 client/sound folder (this location can change from from OS to OS I would assume)
copy and replace two files into their program files/teamspeak3 client/sound/default folder
delete a single file in their program files/teamspeak3 client/sound/default folder (if it is easier just replace it with a blank file instead).
I just cannot figure out how to make this happen, is there anyone can that make this happen in some sort of "user friendly" executable file? I just need the most basic/simple/easiest thing possible to make this happen for my members and I am willing to pay.
09-18-2011, 06:52 PM
Cliffo, you seem to have organized what you want to accomplish pretty well, so having done that, why don't you look into simply writing a batch-file for this chore?
Since this is just a script, you can change it in a text-editor without re-compiling to an executable and since it's all native system calls, you reduce the possibility of OS version-conflicts, DLL differences and runtime issues.
Additionally, if this runs on other OS's (Mac.*nix), you just adapt the script to those platform's scripting format.
Make some dummy-directories/files and experiment with getting your batch file to do what you've outlined, once you've got the file tuned-up, you can add some tweaks to hide it's execution window and put up a splash screen while it executes, if you want.
If you make this small effort, you'll have control over this process yourself and won't be dependent on other coders to deliver what you want.
Alternatively, you can download a free version of Visual Studio and the Platform SDK, configure your IDE and build a bare-bones C++ program that actually does exactly the same thing, but it's really overkill for something as simple as this. You're just doing file and directory stuff, which is exactly what batch-files were intended for.
09-19-2011, 08:05 AM
Can batch files also do search and replace on text inside of files? Do you know of a good guide to learn the basic batch file coding? I am just not sure where to start.
09-19-2011, 06:09 PM
Yes, Windows has 'Find' functionality built-in, it's a system-call and can be executed from a batch (CMD) file.
EDIT: I should mention that since all batch files do is call either internal or external processes, you can always add functionality by writing an exe to fit any special application you need. This way, the batch-file handles the 'executive' ordering of what to call and when, and you just provide the modules for any special things you want it to run. Most things you can find ready-made on the web, you control their execution through your batch-file (but the majority of functionality is already included in Windows).END EDIT
When PCs first came out ('81-'82), they were command-line oriented DOS devices. Rather than having to type-out each command over and over again (since there was no GUI), users would employ batch-files to consolidate the commands they used most (like listing directories, copying files, etc.).
Every PC user knew how to write simple batch files, new software was installed using batch-files written by the various vendors, batch-files have been around from the beginning of the PC era and are actually a borrowed concept from unix scripts that accomplish the same chores (DOS was actually a CPM hack that was bought from the original author, rebranded by Microsoft and provided to IBM).
They are also called CMD scripts and there are new varieties that some use to roll-out actual windowed apps via a shell script, rather than using a compiler to generate native (exe) code.
I prefer to use C++ for almost everything on local machines and php on my servers for most backend chores because of syntax similarities (an old dogs, new tricks thing), but batch-files are still supported on Windows (even 7) and continue to be used by those that are aware of their utility.
Here's some stuff to get you started:
For windowed (GUI) scripting, you might also like this:
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.