I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi News / Other Topic   Print This     

Back to DOS!

Back to DOS! in Delphi News / Other topic (part of our Pascal and Delphi Coding group).

Quick Search: Back DOS  
rt
Castel, -- UK
I was asked by someone if I could put together a little program which at the press of a button would shut down Windows (and not just go to a DOS window) and then run a true DOS program and then close the system down - although I doubt this last bit.

Naturally I waved the white flag at this, but hoped that someone here may have an inkling of what to do.

I understand that the DOS program is something to obliterate the windows swop file, so it did'nt take a great deal of brain power to guess that the said computer may have been visiting the likes of naughty Nora's enormous knocker sites Yikes!

Well, each to his own I suppose, but out of interest could this be done in Delphi?
rt

Thats enough of that. Ed.

 Posted 16 years ago (Thread Starter)
Comment Quote
About rt -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About rt

I do like my jazz and blues!


Post ID #8925, 13 replies
Thread Started 1/14/2003 12:15:00 PM
View Counter=4422
Last Reply Posted 11/18/2003 10:00:00 AM)
Location=Castel, -- UK 
Joined=19 years ago   MB Posts=687   KB Comments=1  
rt
Castel, -- UK
I think in this particular instance guys, I'll take that as a "No!"
I certainly won't miss the chap who asked me as he's probably out there buying a new long mac I type!

So, a 'thankyou' for your replies and you may be interested to learn that within 5 mins of looking on the net Block Head! I found a bespoke windows prog that will re-encrypct the swap every time the machine boots...

Thats enough of that. Ed.

 Posted 16 years ago (Thread Starter)
Comment Quote
About rt -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About rt

I do like my jazz and blues!


Post ID #8935 (Level 1.1)  Reply to 8925
Thread Started 1/16/2003 5:36:00 AM
View Counter=2
Location=Castel, -- UK 
Joined=19 years ago   MB Posts=687   KB Comments=1  
rt
Castel, -- UK
As far as the job goes, I told the chap to go out and buy the self destructing windows encryption prog!

But, as far as this goes it's very interesting and given some spare time I might out of interest put the brain to the autoexec.bat test Think!

Is it old age or a few years of windows - I used to be heavily into dos and the other day when faced with blinking prompt on the command line I thought what do I do now!! Big Grin!

Thats enough of that. Ed.

 Posted 16 years ago (Thread Starter)
Comment Quote
About rt -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About rt

I do like my jazz and blues!


Post ID #8959 (Level 1.2)  Reply to 8925
Reply Posted 1/24/2003 11:18:00 AM
Location=Castel, -- UK 
Joined=19 years ago   MB Posts=687   KB Comments=1  
rt
Castel, -- UK
Leo, thanks for the concern over my health. I concluded it was a failing memory and that a large quantity of Chablis was the best cure, it couldn't make it any worse Big Grin!

Not quite on the same topic but closely related I found whilst supping the cure that I had had a beamdown from Mr Zarko Gajic's excellent site which included an article or two on controlling windows from Delphi, if the cure has not affected me totally this link should work and give further food for thought - http://delphi.about.com/library/weekly/aa022701a.htm
rt

Thats enough of that. Ed.

 Posted 16 years ago (Thread Starter)
Comment Quote
About rt -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About rt

I do like my jazz and blues!


Post ID #8978 (Level 1.3)  Reply to 8925
Reply Posted 1/28/2003 12:48:00 PM
Location=Castel, -- UK 
Joined=19 years ago   MB Posts=687   KB Comments=1  
Rick Carter
Cincinnati OH USA
As Leo says, "probably...a yes with some difficulty and investigation." But unless it's a very close friend you don't mind doing favors for, or a very high-paying client, it's probably not worth the time and aggravation. And I'd include in the profit margin enough to pick up a couple of O'Reilly books on the OS in question, as they have a lot of great tips on how to do such things.
Rick Carter
Chair, Delphi/Paradox SIG
Cincinnati PC Users Group
 Posted 16 years ago
Comment Quote
About Rick Carter -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #8950 (Level 1.4)  Reply to 8925
Reply Posted 1/22/2003 1:15:00 PM
Location=Cincinnati OH USA  
Joined=18 years ago   MB Posts=518  
Rick Carter
Cincinnati OH USA
I know rt is no longer pursuing this project, but just for future reference for anyone interested, I was surprised to find a reference to this site http://www.dwp42.org/index.php which claims that true 32-bit DOS apps that do not require Win32 can be written in Delphi.
Rick Carter
Chair, Delphi/Paradox SIG
Cincinnati PC Users Group
 Posted 16 years ago
Comment Quote
About Rick Carter -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9010 (Level 1.5)  Reply to 8925
Reply Posted 2/5/2003 1:35:00 PM
Location=Cincinnati OH USA  
Joined=18 years ago   MB Posts=518  
Most Recent Post
Rick Carter
Cincinnati OH USA
Just in case anyone from the original discussion is still around and interesed, I stumbled across a freeware component, TDosCommand: http://maxxdelphisite.free.fr/doscmd.htm
Rick Carter
Chair, Delphi/Paradox SIG
Cincinnati PC Users Group
 Posted 16 years ago
Comment Quote
About Rick Carter -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #10025 (Level 1.6)  Reply to 8925
Reply Posted 11/18/2003 10:00:00 AM
Location=Cincinnati OH USA  
Joined=18 years ago   MB Posts=518  
NevilleRichards
 (Inactive)
UK
Would it be possible for your Delphi program to drop a special autoexec.bat on the c: before it instructed Windows to reboot to DOS?

Provided the autoexec file included a command to run the obliterator, and then delete itself (just possible), the whole scheme ought to work.

Neville Roll Eyes
 Posted 16 years ago
Comment Quote
About NevilleRichards -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #8953 (Level 1.7)  Reply to 8925
Reply Posted 1/23/2003 7:06:00 AM
Location=UK  
Joined=18 years ago   MB Posts=41  
NevilleRichards
 (Inactive)
UK
Alternatively, with a bit of lateral thinking, why not get Windows to trash the file for you?

Request large chunks of memory upto the max available, and write trash in the memory. As the memory is swapped on an off the disk, the disk file will receive the trash!

??

Neville Roll Eyes
 Posted 16 years ago
Comment Quote
About NevilleRichards -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #8966 (Level 1.8)  Reply to 8925
Reply Posted 1/26/2003 12:09:00 AM
Location=UK  
Joined=18 years ago   MB Posts=41  
Angel
 (Inactive)
England
Its possible to shut down windows via delphi programs, but to run a dos program after that I arent too sure. You would need to set the Dos program to check a variable every time the computer was shut down and set the variable when the delphi prog closed down the system. I think running a DOS program without Windows running is otherwise beyond the realms of a Windows programming language.

Also, I think this would depend on the versions of both Windows and Dos being used.
 Posted 16 years ago
Comment Quote
About Angel -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #8929 (Level 1.9)  Reply to 8925
Reply Posted 1/15/2003 12:40:00 AM
Location=England  
Joined=18 years ago   MB Posts=199  
Leo
Civilized Africa
I used to play old fasioned Dos games on my 95 box. Some games refused to run in the Dos Window. There windows has the ability to restart into Dos mode if you set up the start up icon for the game right (I can't say off the top of my head how but I did do it). Once you leave the game you could restart windows and you'd have to log in again and every thing. I'm pretty sure XP won't play along with this like 95 did. Also if Windows can shut down the PC, I suppose so can any other Dos Program - WinMe and every thing before it are in fact Dos Programs. WinNT and Xp is a different story. You'll have to learn about power management in windows. I would see if I can find info on the Win API for Delphi if i was doing this. Maybe you can imitate it in Dos? As far as I can tell Xp won't let you do this stuff.
Another Leo
_ _ ___________________ _ _
We are Micro$oft
You will be assimilated
Resistance is futile
 Posted 16 years ago
Comment Quote
About Leo -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #8932 (Level 1.10)  Reply to 8925
Reply Posted 1/15/2003 9:49:00 PM
Location=Civilized Africa  
Joined=17 years ago   MB Posts=96  
Leo
Civilized Africa
I’ve had some interesting experiences that won’t help us solve this but it indicates that every thing is possible if you know how. First I’ve had to run a Dos program on XP. I simply typed Command.com in the Start->Run box and I had a Dos window. This might indicate that XP isn’t really so far removed from Dos as it likes to pretend.

Second I’ve had to restore a registry. At the end of restoring registry from Dos based scanreg (Not scanregw) it tells you to reboot and presents a reboot button. That tells me its possible to reboot or shut down from a Dos program just like from windows. THis preobably means you can take the above as a yes with some difficulty and investigation. Just adding these comments in case some one else ever wants to try this.
Another Leo
_ _ ___________________ _ _
We are Micro$oft
You will be assimilated
Resistance is futile
 Posted 16 years ago
Comment Quote
About Leo -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #8947 (Level 1.11)  Reply to 8925
Reply Posted 1/21/2003 9:15:00 PM
Location=Civilized Africa  
Joined=17 years ago   MB Posts=96  
Leo
Civilized Africa
RT feeling intimidated by the command prompt is a sure sign that you are being assimilated. M$ has placed nanno bots on your Windo$e CD and when you put that into your pc you were infected by touch. It’s not long now before you’ll tell us that dam Office paperclip is one of the most helpful programs ever invented! This is serious. I recommend spending next weekend reordering your hard disk from the command prompt to ward off the evil carma. HEHE.

I don’t have high hopes for the autoexec.bat file since I’m not sure that runs when you restart into dos. This lateral suggestion sounds interesting though and definitely shows some promise. I’m sure a program can be activated though from windows before it restarts if you create an icon for it and set that up right because like I said I’ve done it with old games (who remembers lemmings?). What happens is that the pc restarts in dos and runs the program you chose to execute. The most difficult part after that is to get the dam thing shut down. Back then I could push off the power button and stop everything. Nowadays the thing has to switch itself off. I’m sure that this is available in Delphi. Perhaps we should ask some Linux people how they handled the shutdown and power management in their work.
Another Leo
_ _ ___________________ _ _
We are Micro$oft
You will be assimilated
Resistance is futile
 Posted 16 years ago
Comment Quote
About Leo -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #8969 (Level 1.12)  Reply to 8925
Reply Posted 1/26/2003 9:39:00 PM
Location=Civilized Africa  
Joined=17 years ago   MB Posts=96  
Leo
Civilized Africa
RT I do suppose Chablis is a good cure for nanno bots also! The Burgundy coloured variety also provides the added benefit of all the antioxidants and cancer preventing properties of tannin, the substance that cause the red colour. This is what I’ve retained from my biochemistry minor: beer and red whine could make you live longer or kill you on the spot. HEHE

This is exactly what I was talking bout Rick! I’m not surprised since my first programming experience was Pascal programming in dos. Of course 32 bit wasn’t even a thought yet. And like I said Windo$e 9x series is in fact just a Dos program.
Another Leo
_ _ ___________________ _ _
We are Micro$oft
You will be assimilated
Resistance is futile
 Posted 16 years ago
Comment Quote
About Leo -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #9011 (Level 1.13)  Reply to 8925
Reply Posted 2/5/2003 9:58:00 PM
Location=Civilized Africa  
Joined=17 years ago   MB Posts=96  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1142A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #8925 Counter
4422
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech