|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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... |
|
#2
|
|||
|
|||
|
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 ![]() |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Simple x basic help/question... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|