Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to force power-down while running

Posted on 1999-06-28
16
Medium Priority
?
172 Views
Last Modified: 2013-12-28
I have an application in which the power supply must be able to be cut at any time (throwing caution to the wind, I know), and at the time of power-on, 98 must come back up with no problems.  I have almost accomplished this.  I now only have one problem: whenever I power down the computer without first shutting down windows, I loose everything in [Start]/programs/startup (the links are still physically in the directory structure, but for some reason 98 does not read them).  Any ideas on how to cure this one would be greatly appreciated.
0
Comment
Question by:everlone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 2
  • +1
16 Comments
 
LVL 12

Expert Comment

by:Patricia Siu-Lai Ho
ID: 1671713
everlone, try this:-
--------
(1) Do registry repair/fixing:-
 
    Restart the computer, press <CTRL> or <F8> key before win98 logo appears,

    At the boot menu, go to the command mode,

    At C:\ prompt, type "SCANDISK /ALL" (without quotation), <ENTER> , it will scan the disk and repair, if any.

    At C:\ prompt, type "SCANREG /FIX" (without quotation), <ENTER> , it will update and fix the registry of system.dat and user.dat.

    Following the instruction.

    Restart Pc and go into safe mode, if run OK.
    Then restart and go into the normal desktop. Check any conflict.

    Then don't do anything on the desktop. Go to start- Shut down - select 'Shut down" , confirm OK.

    Then computer will remember it is a normal shut down for your next normal bootup.

----
Try and let me know if you have any queries.     pslh
0
 

Author Comment

by:everlone
ID: 1671714
Well, this seemed to work at first, and the computer restarted ok.  But then while running, I powered down, and it again lost the start menu .lnk files.  On further investigation, it seems to be dropping long file/folder names when it powers down without a shutdown, and recreates the folders on startup.  So I'm left with a c:\windows\alluse~1, whose long dir name is c:\windows\alluse~1, AND
c:\windows\alluse~2, whose long dir name is c:\windows\all users.
I tried setting up a batch to copy the alluse~1 files through the autoexec, but it does not recreate the 'all users' directory until windows actually starts (well after the autoexec runs).  Any other clues?

0
 
LVL 12

Expert Comment

by:Patricia Siu-Lai Ho
ID: 1671715
everlone, May I know why and how you powered down the Pc while running <<But then while running, I powered down>>.

Please give details about the make of your Pc. It assembled by you or by OEM manufacturer? Any networking or multiuser for the computer.                pslh



0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:everlone
ID: 1671716
pslh,  the application is something that I can't really discuss, but what happens is that while a machine is running, this computer is attached, and is also running.  If the machine powers down, the computer power is cut off.  So rather than shutting Win 98 down properly, the computer simply loses its power source.  
  The machine is an old Compaq Presario P133, with a hard drive reformatted with _only_ Win 98 and one small proprietary program running through the startup.  There is no networking or multi-user setup.  I would much rather go to Linux and/or come up with an external switch which actually shuts down Win 98 before powerdown, but my hands are tied by my higher-ups.
0
 
LVL 12

Expert Comment

by:Patricia Siu-Lai Ho
ID: 1671717
everlone, are you now testing that machine linked with your Pc- if sudden power down of the machine, what happens to your Pc and you're trying to find a safer solution? Or it sudden happens that you're not prepared for the any safer linkages with this?       pslh
0
 

Author Comment

by:everlone
ID: 1671718
Actually, the machine is fine regardless... it only sends output to the Compaq through the serial port, and the Compaq performs several operations on this data, and the data is directly printed from there.  I'm not concerned about the machine, safety, etc.  I'm only concerned with the fact that the Compaq, when it loses power, can come back up without any hassle or user intervention.  
0
 
LVL 12

Expert Comment

by:Patricia Siu-Lai Ho
ID: 1671719
everlone, when <<But then while running, I powered down, and it again lost the start menu .lnk files>> the Pc restart, did it scandisk by itself. Did it go to the safe mode by itself or booting into the normal desktop. You've found lost "start menu .lnk ", which start menu you are referring to in which directory ?  Only this losing the long file name, how about other files in window also losing the long file name?

Please tell me: Start-run - type "msconfig" OK, General Tab - advanced button - [x]Disable fast shut down. If it is checked or not. If not, checked it.  OK and Exit.

Shut down the Pc. Try your testing.    pslh    
0
 

Author Comment

by:everlone
ID: 1671720
The computer does the scandisk automatically, and boots to the normal desktop.    I found the lost "start menu .lnk" in 'c:\windows\alluse~1' (no long file name), Windows creates a new 'c:\windows\all users' dir.  It also looses the long file names for the temporary internet files dir, and maybe a few others that are of no consequence to me, other than taking up space. Enable Fast Shutdown is checked (If you know what this _actually_ does, I'm all ears). *Shrug*  I'm at a loss.  Is there a way that you know of to force windows to not attempt to save the desktop settings (as well as other settings) at shutdown?  Maybe that would help.
0
 
LVL 1

Expert Comment

by:funkyfish
ID: 1671721
What it seems to me that you are trying to do is to get this lone propriatary program to run on startup, right?  Well, how about instead of putting a .lnk in the startup folder, add a run=c:\program\topsecret\dontlookhere\orillkillyou\program.exe line in the win.ini?  That won't be erased or compromised when you startup and shut down the improper way.
Let me know.
~~FunkyFish

0
 

Author Comment

by:everlone
ID: 1671722
I'll give that a try tonight.  Thanks for the input.
0
 
LVL 1

Expert Comment

by:syzygy
ID: 1671723
what about sticking some sort of UPS ontop the system?  If set up right it should be able to initilise a safe shutdown of teh system when power is lost.

Also is it 100% nessesscary for teh system to lose power? if the system kept going while the machine was shutdown, what sort of problems would that involve?  If all the machine does it output data (the computer only analyses it) then surely having the machine die but not teh computer would simply resulty in loss of data for that time period? (a loss face anyway since the computer currently has no power to it)

If the machine is supplying power to the system, can the power be sourced elsewhere?  run an extenstion lead to another powerpoint, that sort of thing.

It might help if you told us what the setup was for... it would at least help with my curiosity.  :)


0
 

Author Comment

by:everlone
ID: 1671724
   Well, pslh, I thank you for all your help, but FunkyFish's quick and dirty solution solved the problem for now.  Now, this is the first question I've posted.  Although pslh had much info and was of great assistance (and I appreciate it very much), FunkyFish was the one who gave me the answer which I am using.  So do I need to reject pslh's answer to give FunkyFish the points, or how does this work?
    Syzygy:  As you suggested, we will probably implement a UPS also.  
The machine is designed for the power to the computer to run directly through the machine, and I'm afraid that the engineers will not bend on their design, unless all possiblilities show to fail.  However, with the simple win.ini solution (sometimes it's the simply-solved problems that we just can't seem to figure out.), along with a ups, it should be a decent test system, until I can go through the channels and have it designed differently.  
    I appreciate your help, everybody.
0
 
LVL 12

Expert Comment

by:Patricia Siu-Lai Ho
ID: 1671725
everlone, just reject my answer, FunkyFish will then post his answer. Then you can grade him the points.

Just interested to know are you really add the line with exact wording to the win.ini.
"run=c:\program\topsecret\dontlookhere\orillkillyou\program.exe " 
And it did solve the problem, please advise how you do it so as to make a record for this question.         pslh
0
 

Author Comment

by:everlone
ID: 1671726
Well, I didn't exactly use "run=c:\program\topsecret\dontlookhere\orillkillyou\program.exe", but I did add to the win.ini:  "run=c:\proggypath\proggy.exe", replacing proggypath and proggy.exe with the actual path and executable.
Now, when I boot up the computer, I force an autofix on the scandisk, and it runs automatically.  Then the win.ini runs the proggy that I need to auto-start, and everything works as planned.  I will be adding a UPS soon to allow a proper shutdown.  Although the answer was simple, I was just looking for something much harder (reghacks, etc.)  Thanks for your help, everybody.   FunkyFish, if you want to post your answer, I'll rate it for you.
0
 
LVL 1

Accepted Solution

by:
funkyfish earned 1200 total points
ID: 1671727
What i said before, but with a bigger smile :o)
0
 

Author Comment

by:everlone
ID: 1671728
Once again, thanks all.
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring Remote Assistance for use with SCCM
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question