LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-11-2006, 08:28 PM   #1
unixbrain
Member
 
Registered: Sep 2003
Posts: 33

Rep: Reputation: 15
adding functionality to an existing program


Recently, a friend of mine asked me to make a program. She has an accounting software, but it does not have a backup funtionality. She asked me to create a program that will make the program run a backup procedure automatically. The backup procedure involves a few steps, including setting the time & date back, printing a few reports, and backing up the reports.

So my question here is, how do I do it? It's true I do not have any experience in this, but if you were in my shoes, how would you do it?
 
Old 01-12-2006, 12:39 AM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
is this software running on linux?

if so.. you should check out using cron and tar.. could easily make some b|g zip'd tarballs that are backed up every so often..

if not.. install linux..
 
Old 01-12-2006, 03:39 AM   #3
unixbrain
Member
 
Registered: Sep 2003
Posts: 33

Original Poster
Rep: Reputation: 15
It is run in Windows. However, the backup procedure required her to access last year's General Ledger, make sure that they are posted, print out hardcopy and save a softcopy into a storage (Basically, that's the procedure). She wanted all these to be done in automation, with a click of a button. I hope I put myself clearly.

I am also curious how it is done in Linux.
 
Old 01-12-2006, 03:05 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,290

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
who is General Ledger?

not sure why this wouldn't work.

i created a launcher in cpp in my college years (it would launch calc.exe, then notepad.exe, the iexplore.exe). i prolly can't find the sourcecode now - i think it's 'NtCreateProcess()' or something.

can you create a launcher that would 'cp filename filename.bak', then run the program. (is there an lpr equivelent for m$ windoze.)
 
Old 01-12-2006, 03:35 PM   #5
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
Quote:
Originally Posted by unixbrain
It is run in Windows. However, the backup procedure required her to access last year's General Ledger, make sure that they are posted, print out hardcopy and save a softcopy into a storage (Basically, that's the procedure). She wanted all these to be done in automation, with a click of a button. I hope I put myself clearly.

I am also curious how it is done in Linux.

I guess the first thing you need to do is determine if you need to get to any individual information stored in the programs data files.. or just make a copy of a certain file(s).. if all you have to do is to do a copy file(s) to a different location then you could just make a batch file that did it for you.. if you actually need to read from the programs datafile then you need to know how the program stores the information that you need to get to.. if you are doing this it will make it a little more complicated.. so im not going there for now..

so you could do as schneidz suggested and make a launcher app.. or you could just make a little batch file named backup and she could click it...

?? hth
 
Old 01-12-2006, 03:58 PM   #6
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
One variation of program data files that are a little easier would be if it was stored on a database. But you really need to find out how the program stores this data. As a general rule if they are managed internally by the program then you're in trouble because it can be so hard to find out how the data is actually stored.

So to reiterate home work for tonight ... Find out which files you need to consider and how the files are actually stored.

graeme.
 
Old 01-14-2006, 07:50 PM   #7
unixbrain
Member
 
Registered: Sep 2003
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks to all for your feedback. To answer xhi's question, I need to read from the data file. I think the files are stored in a database, but i cant determine the type of database the program is using. I will make a copy of the program and examine it in my computer.

Another question i would like to post here is, is it possible to create my own program that will execute the program and control all the functions in the program to run the procedure?
 
Old 01-14-2006, 10:08 PM   #8
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
Quote:
To answer xhi's question, I need to read from the data file. I think the files are stored in a database, but i cant determine the type of database the program is using. I will make a copy of the program and examine it in my computer.
research, research, research.. i would start by tryign to find documentation on how the data files are constructed.. it possibly is outlined somewhere in the programs docs or other notes on the program.. more than likely it is not.. so you will have to reverse it.. the best thing to do is to save some dummy data that you know, then examine the file and see if you can find that data and determine how it is stored.. its hard to say what format the data file is.. the data could be in plaintext(yeh right!), binary, or binary and encrypted.. its not going to be real easy.. but it is possible.. just will take some work i guess.. i would start the reversing process by finding which dll/exe is doing the writing and tear it apart and see whats inside..
Quote:
Another question i would like to post here is, is it possible to create my own program that will execute the program and control all the functions in the program to run the procedure?
as far as i know.. the only way that you would really be able to do anything with the other program is if either there are command line params available to run the program or if the libs are available freely so you could kind of clone the program... which if it is closed source, is quite unlikely..
 
Old 01-16-2006, 11:13 AM   #9
kike_coello
Member
 
Registered: Jul 2005
Location: maryland
Distribution: Ubuntu 9.04
Posts: 88

Rep: Reputation: 17
yeah, if you want to have your program call other programs and interact with them you have to look at all the command line options that each program has

usually all you have to do is type the name of the program with a "--help" in linux or windows and you'll get a listing of the command line arguments. then put those in your script
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new group to existing user ALF Linux - Software 7 05-08-2006 10:35 PM
Adding a new partition to an existing LV ntwrkguru Fedora 9 11-03-2005 09:22 AM
adding second router to existing network crnchyfrog Linux - Networking 2 06-06-2005 09:19 PM
adding an existing XP partition to GRUB phoeniks Linux - General 3 08-27-2004 01:54 PM
Adding new os to existing one synapse Linux - Newbie 1 01-27-2004 11:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration