shutdown script

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

IAmOmnifarious
Posts: 3
Joined: Fri Jun 27, 2008 5:10 pm UTC

shutdown script

Postby IAmOmnifarious » Sun Jun 29, 2008 7:07 pm UTC

I have windows Vista and I want to either A: View the code of an exe file and/or B: run a script at shutdown.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: shutdown script

Postby Berengal » Sun Jun 29, 2008 7:27 pm UTC

IAmOmnifarious wrote:A: View the code of an exe file

Open it in notepad. Or get a disassembler. Hope you like assembly...
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

jbadams
Posts: 10
Joined: Mon Jun 16, 2008 10:03 am UTC

Re: shutdown script

Postby jbadams » Mon Jun 30, 2008 5:46 am UTC

The two things you want to achieve seem to be pretty unrelated, what is it you're actually trying to achieve?

For the first, you'll need a disassembler, but the output is unlikely to be particularly pretty, so you'll need to know what you're doing for it to be much use.

For the shutdown script, if you're willing to use your own custom method instead of built-in shutdown commands you could write yourself a batch file which does whatever it is you're trying to achieve and then calls shutdown.exe - check the help for various command-line arguments you can use.

IAmOmnifarious
Posts: 3
Joined: Fri Jun 27, 2008 5:10 pm UTC

Re: shutdown script

Postby IAmOmnifarious » Mon Jun 30, 2008 7:01 am UTC

The shutdown process on vista is called shutdown.exe, and it cannot be run via dos so I can't just open it in notepad (I tried).

I want to have the computer toss a capture of the dns into a log right before it finishes shutting down.

User avatar
Sparv
Posts: 44
Joined: Tue Jun 24, 2008 6:55 pm UTC
Location: France
Contact:

Re: shutdown script

Postby Sparv » Mon Jun 30, 2008 7:23 am UTC

jbadams wrote: but the output is unlikely to be particularly pretty


That's the Euphemism Of The Day.

IAmOmnifarious wrote:The shutdown process on vista is called shutdown.exe, and it cannot be run via dos so I can't just open it in notepad (I tried).


You want to edit shutdown.exe to have it execute something before shutdown? There are easier way to do it. Hang on, I'll search for the sake of curiosity.
Shit happens

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: shutdown script

Postby Berengal » Mon Jun 30, 2008 8:47 am UTC

Run mmc -> File -> Add/Remove Snap-in... -> Add... -> Group Policy Object Editor -> Add -> Finish -> Ok -> Local Computer Policy -> Windows Settings -> Scripts (Startup/Shutdown)
I think you can take it from there.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

IAmOmnifarious
Posts: 3
Joined: Fri Jun 27, 2008 5:10 pm UTC

Re: shutdown script

Postby IAmOmnifarious » Tue Jul 01, 2008 4:24 pm UTC

"You want to edit shutdown.exe to have it execute something before shutdown? There are easier way to do it. Hang on, I'll search for the sake of curiosity."

Not quite. I want the computer to go through the majority of it's shutdown process /then/ toss a capture into a log.

User avatar
Briareos
Posts: 1940
Joined: Thu Jul 12, 2007 12:40 pm UTC
Location: Town of the Big House

Re: shutdown script

Postby Briareos » Tue Jul 01, 2008 4:38 pm UTC

What are you trying to capture? Or, what do you gain by doing this in the middle of the shutdown process rather than at its beginning? I think if you gave a higher-level description of what you're trying to accomplish, people could offer better advice.
Sandry wrote:Bless you, Briareos.

Blriaraisghaasghoasufdpt.
Oregonaut wrote:Briareos is my new bestest friend.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 9 guests