ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 1st, 2002, 02:15 AM
InGearX InGearX is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 2 InGearX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Simple x basic help/question...

I want to:
1) change date to 05-15-2002
2) lunch program "C:\prog.exe"
3) change date back to todays date
4) compile code into an executable (.exe)

I do not care what language is used as long as it's done...
I picked old QBasic ... thinking it would be quick n easy...

Here is what I have so far (code is almost the same for any basic...):
Code:
CLS
LET d$ = DATE$
	PRINT "TODAY's date stored as: "; d$
SHELL "date 05-10-2002"
	PRINT ">>> executed date and set it to 05-5-2002 Check: date is "; DATE$
	PRINT ">>> lunching program C:\prog.exe"
SHELL "C:\prog.exe"
	PRINT ">>> program should be lunched by now!"
	PRINT ">>> reseting date to"; d$
SHELL "date d$"
	PRINT ">>> Date is now"; DATE$
	PRINT "DONE!"

Problems:
1) program fails to lunch - get "Bad command or file name"
2) when reseting date to one stored in d$ program waits for user input! instead of accepting the d$ string!

Any help is much appreciate...
open to ANY suggestions in regard on how to do this...

Thank you...

Reply With Quote
  #2  
Old July 1st, 2002, 06:08 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Ahhh, QBasic was such a cool program. I used to use it in the early nineties when I was just starting to program

With the date, i dont think there is any other way to use the date.com command. I think your best bet would be to search the net for a tiny DOS app that accepts a parameter to change the date without prompts.

As for executing the .exe, first try placing it in the same directory as your .BAS file and call it without a path, that should work.

My QBasic memory is a little shot, so that's the best I can do

Reply With Quote
  #3  
Old July 3rd, 2002, 06:50 PM
InGearX InGearX is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 2 InGearX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thx all...
QBasic was a istake althought I fixed the date problem via
LET d$ = DATE$
SHELL "date 05-10-2002" //new
DATE$ = d$ //back to current...

but it just failed to executew another program...

So I installed my VB and did it in about 10 min!

URL

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Simple x basic help/question...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway