Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Killing Windows

  1. #1
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Question Killing Windows

    I am trying to get windows to automatically shutdown, when exit my MP3 player, I'm currently using a batch file which executes rundll32.exe, however this causes problems as it cann't shutdown while the batch file is running, any ideas on how to force shutdown.

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  2. #2
    Constant Bitrate
    Join Date
    May 2001
    Posts
    128

    Post

    how is the batch file called? does the program call it? do you click on it? if you trigger it yourself you could just create a desktop shortcut to rundll32. i guess i dont completely understand your situation.
    Athlon 500, 128 MB, ATI Xpert 4MB AGP TV-Out, Sound Blaster Live! Value, 8.4 GB, 2x20 Backlit LCD, Keypower 250 Watt ATX DC-DC, DSchmitd Startup/Shutdown Controller, IRMan + Backlit IR Remote, Custom Keypad, 5.6" NTSC LCD, In-Dash Slot Loading DVD, all installed in an '87 Honda Accord LX-i

  3. #3
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    THe bacth file is in the start up folder so it is automatically run when windows loads, it runs my mp3 decoder (winamp at present) then when that is exited it executes rundll32.exe below is a copy of the bat file's contents if it helps.

    -----------------------------
    start /wait winamp
    start /wait rundll32.exe user32.dll,ExitWindowsEx 5,0
    ------------------------------

    The problem seems to be due to the fact that rundll32 can't shut down, as the batch file is still open, is there any way around this, ie forcing shut down. NB, I'm not using a keyboard or mouse so I don't want hot keys.

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  4. #4
    Newbie
    Join Date
    May 2001
    Location
    Conklin, NY
    Posts
    23

    Post

    what if you got rid of the /wait in the rundll statement? it seems logical that if you keep the wait in there, it will wait for windows to shut down before ending the batch file, and this is an impossible situation. however, if you get rid of the /wait, the batch will immediately terminate and the rundll should be successful.

  5. #5
    Maximum Bitrate Meatballman's Avatar
    Join Date
    Jul 1999
    Location
    Hartsville, SC
    Posts
    747

    Post

    You may want to check for winamp plugins, I'm not sure, but I think there are several that include shutdown features. The plugin I used for remote control supported shutdown.

    just my 2¢

  6. #6
    FLAC
    Join Date
    Aug 1999
    Location
    Upper Marlboro, MD 20772
    Posts
    1,311

    Cool

    nop, its not winamp pluggin. He needs to get rid of that /wait command. That should do the trik.
    abcd-1
    Author of CobraI,II,III and now CobraIV.
    You can contact me on AOL instant messenger....nick is cenwesi or cenwesi3

  7. #7
    Retired Admin Aaron Cake's Avatar
    Join Date
    Jan 2000
    Location
    London, Ontario, Canada
    Posts
    2,464

    Cool

    You can make a little application in VB or some other language that calls the ShutDownWindows() API. There is a parameter that allows you to forcefully shut down Windows, no matter what the OS or applications are doing.
    Player: Pentium 166MMX, Amptron 598LMR MB w/onboard Sound, Video, LAN, 10.2 Gig Fujitsu Laptop HD, Arise 865 DC-DC Converter, Lexan Case, Custom Software w/Voice Interface, MS Access Based Playlists
    Car: 1986 Mazda RX-7 Turbo (highly modded), 1978 RX-7 Beater (Dead, parting out), 2001 Honda Insight
    "If one more body-kitted, cut-spring-lowered, farty-exhausted Civic revs on me at an intersection, I swear I'm going to get out of my car and cram their ridiculous double-decker aluminium wing firmly up their rump."

  8. #8
    cj
    cj is offline
    Low Bitrate
    Join Date
    Aug 2001
    Posts
    57

    Post

    Don't forget to make your batch file exit:
    http://www.computerhope.com/issues/ch000321.htm

    Also, if you have Win98 you may want to call shell32.dll instead of user32.dll. Play with various incarnations listed here:
    http://www.robvanderwoude.com/shutdown.html

  9. #9
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Talking

    Cheers, I'd already tried removing the wait command but that just made thinks go Pete Tong, but the alternative lines for the batch file work like a dream!
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  10. #10
    cj
    cj is offline
    Low Bitrate
    Join Date
    Aug 2001
    Posts
    57

    Post

    Which one did you end up using and what OS are you running? (for future reference to others on the board)

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •