Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2008, 12:49 AM
Registered User
 
Join Date: Aug 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Building a backup utility

I have created a small backup utility. The only problem is the path names were hard coded into the program so any time I want to change them I have to rewrite the code. So, I am going to create an interface that asks for the source and target directory. What I want is something similar to the nt backup that came with windows. The program itself has to be a scheduled task that will run automatically every night but what I am trying to figure out is how can I create it so when the program runs, it doesn't always ask you for the source and target paths. Basically, the settings is separate from the actual backing up.

thanks

 
Old September 5th, 2008, 03:15 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You can schedule tasks using the "AT" command:

http://support.microsoft.com/kb/313565

This isn't really a C# question though is it...

/- Sam Judson : Wrox Technical Editor -/
 
Old September 5th, 2008, 07:07 AM
Registered User
 
Join Date: Aug 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I thought it was. I want the program I create to schedule the task. So first, the user is presented an interface that they enter the source and target destinations, then the backup utility uses that info and (this is the part I don't know how to code) the program creates a scheduled task. Then when the scheduled task runs, it runs without asking for the source and target info. Then if the user wants to change the source and target path they double click on the icon and they can re-enter the source and target which automatically creates a new scheduled task. The way it is now is you enter the paths into the program, and then I go into scheduled tasks and create a task but when the program runs, it always asks you for a source and target directory. This isn't good because it isn't automated and someone has to be there to type in the same source and target each time.

 
Old September 5th, 2008, 09:53 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Well this project seems to do what you want:

http://www.codeproject.com/KB/cs/tsn...=2683958&fr=51

Or you could just use System.Diagnostics.Process to run the "AT" command.

/- Sam Judson : Wrox Technical Editor -/
 
Old September 5th, 2008, 12:10 PM
Registered User
 
Join Date: Aug 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I'll look into this.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Create backup folder & also backup files miracles Excel VBA 0 April 16th, 2007 02:28 AM
Cool utility Yurko SQL Server 2000 3 December 2nd, 2005 11:03 AM
Aspnet_regiis utility ak ASP.NET 1.0 and 1.1 Basics 1 March 5th, 2004 01:17 PM
vb utility kumarpa Pro VB 6 1 March 5th, 2004 10:40 AM
vb utility kumarpa Access 0 March 1st, 2004 05:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.