Jump to content

Bootup - Shutdown logger


Recommended Posts

Guest PSRumbagh
Posted

I would like to produce a (text) file that shows when (date & time) bootup is

completed and when shutdown is initiated. The file needs to append itself

everytime bootup and shutdown occurs, i.e the file grows bigger with time.

For example, over a year period the file will probably have many hundreds of

entries in it. The program must NOT delete previous entries. Any

suggestions?

Posted

Re: Bootup - Shutdown logger

 

This was just discussed in *Elapsed time meter*

 

See Franc's second message [04-14-08] for autoexec.bat entries to create a

text file.

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

"PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| I would like to produce a (text) file that shows when (date & time) bootup

is

| completed and when shutdown is initiated. The file needs to append itself

| everytime bootup and shutdown occurs, i.e the file grows bigger with time.

| For example, over a year period the file will probably have many hundreds

of

| entries in it. The program must NOT delete previous entries. Any

| suggestions?

Posted

Re: Bootup - Shutdown logger

 

Perhaps I should add, that there were times when someone would request an

actual program that would do this [with password protection] and I would

install Sentry or another boot protection program [something they could

understand].

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

It's difficult to pin down when boot up is "finished", but a rough estimate

is provided by a script in the Startup folder. For shutdown, you use a

script to initiate shutdown. Both scripts write the date/time to a single,

mutual file.

 

How's that for an idea? I even have most of the code written. But you've

been given a lot of info already, with no seeming result. What's wrong with

the solutions already provided in this forum?

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

>I would like to produce a (text) file that shows when (date & time) bootup

>is

> completed and when shutdown is initiated. The file needs to append itself

> everytime bootup and shutdown occurs, i.e the file grows bigger with time.

> For example, over a year period the file will probably have many hundreds

> of

> entries in it. The program must NOT delete previous entries. Any

> suggestions?

Guest PSRumbagh
Posted

Re: Bootup - Shutdown logger

 

Not being a computer whiz, I am a little reluctant to mess with the

autoexec.bat file. What happens if I make a typo error when modifying the

autoexec.bat file? Will my PC fail to boot? Then what?

 

"Gary S. Terhune" wrote:

> It's difficult to pin down when boot up is "finished", but a rough estimate

> is provided by a script in the Startup folder. For shutdown, you use a

> script to initiate shutdown. Both scripts write the date/time to a single,

> mutual file.

>

> How's that for an idea? I even have most of the code written. But you've

> been given a lot of info already, with no seeming result. What's wrong with

> the solutions already provided in this forum?

>

> --

> Gary S. Terhune

> MS-MVP Shell/User

> http://www.grystmill.com

>

> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> >I would like to produce a (text) file that shows when (date & time) bootup

> >is

> > completed and when shutdown is initiated. The file needs to append itself

> > everytime bootup and shutdown occurs, i.e the file grows bigger with time.

> > For example, over a year period the file will probably have many hundreds

> > of

> > entries in it. The program must NOT delete previous entries. Any

> > suggestions?

>

>

Guest PSRumbagh
Posted

Re: Bootup - Shutdown logger

 

Not being a computer whiz, I am a little reluctant to mess with the

autoexec.bat file. What happens if I make a typo error when modifying the

autoexec.bat file? Will my PC fail to boot? Then what?

 

"MEB" wrote:

> This was just discussed in *Elapsed time meter*

>

> See Franc's second message [04-14-08] for autoexec.bat entries to create a

> text file.

>

> --

> MEB http://peoplescounsel.orgfree.com

> --

> _________

>

> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> | I would like to produce a (text) file that shows when (date & time) bootup

> is

> | completed and when shutdown is initiated. The file needs to append itself

> | everytime bootup and shutdown occurs, i.e the file grows bigger with time.

> | For example, over a year period the file will probably have many hundreds

> of

> | entries in it. The program must NOT delete previous entries. Any

> | suggestions?

>

>

>

Posted

Re: Bootup - Shutdown logger

 

Franc was careful enough: that seemed to be correct and intact when posted.

A cut and paste of the lines into a text editor, and saving the file as >

test.bat < would allow you to test without any difficulties. Just click on

the bat you created in Explorer, and look in the folder at the created text

file to see if it contains what you want [or use the RUN box or MSDOS

prompt]. If it suits your purposes, then add the lines into the autoexec.bat

by cutting and pasting there. NOTE: place them at the end of the Batch.

 

If you mess up the test.bat, then nothing untoward will occur while

testing.

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

 

"PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

news:704CE063-2A48-449D-877D-E43FC254942F@microsoft.com...

| Not being a computer whiz, I am a little reluctant to mess with the

| autoexec.bat file. What happens if I make a typo error when modifying the

| autoexec.bat file? Will my PC fail to boot? Then what?

|

| "MEB" wrote:

|

| > This was just discussed in *Elapsed time meter*

| >

| > See Franc's second message [04-14-08] for autoexec.bat entries to

create a

| > text file.

| >

| > --

| > MEB http://peoplescounsel.orgfree.com

| > --

| > _________

| >

| > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| > | I would like to produce a (text) file that shows when (date & time)

bootup

| > is

| > | completed and when shutdown is initiated. The file needs to append

itself

| > | everytime bootup and shutdown occurs, i.e the file grows bigger with

time.

| > | For example, over a year period the file will probably have many

hundreds

| > of

| > | entries in it. The program must NOT delete previous entries. Any

| > | suggestions?

| >

| >

| >

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Nothing you put in autoexec.bat is going to tell you when boot "finishes."

 

I'm lost. What was the recommended autoexec.bat command? Was it just to put

a timestamp in a log?

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"MEB" <meb@not here@hotmail.com> wrote in message

news:O62cIASoIHA.1740@TK2MSFTNGP05.phx.gbl...

> Franc was careful enough: that seemed to be correct and intact when

> posted.

> A cut and paste of the lines into a text editor, and saving the file as >

> test.bat < would allow you to test without any difficulties. Just click

> on

> the bat you created in Explorer, and look in the folder at the created

> text

> file to see if it contains what you want [or use the RUN box or MSDOS

> prompt]. If it suits your purposes, then add the lines into the

> autoexec.bat

> by cutting and pasting there. NOTE: place them at the end of the Batch.

>

> If you mess up the test.bat, then nothing untoward will occur while

> testing.

>

> --

> MEB http://peoplescounsel.orgfree.com

> --

> _________

>

>

> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> news:704CE063-2A48-449D-877D-E43FC254942F@microsoft.com...

> | Not being a computer whiz, I am a little reluctant to mess with the

> | autoexec.bat file. What happens if I make a typo error when modifying

> the

> | autoexec.bat file? Will my PC fail to boot? Then what?

> |

> | "MEB" wrote:

> |

> | > This was just discussed in *Elapsed time meter*

> | >

> | > See Franc's second message [04-14-08] for autoexec.bat entries to

> create a

> | > text file.

> | >

> | > --

> | > MEB http://peoplescounsel.orgfree.com

> | > --

> | > _________

> | >

> | > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | > news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> | > | I would like to produce a (text) file that shows when (date & time)

> bootup

> | > is

> | > | completed and when shutdown is initiated. The file needs to append

> itself

> | > | everytime bootup and shutdown occurs, i.e the file grows bigger with

> time.

> | > | For example, over a year period the file will probably have many

> hundreds

> | > of

> | > | entries in it. The program must NOT delete previous entries. Any

> | > | suggestions?

> | >

> | >

> | >

>

>

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Take our word for it, nothing that's been recommended will do anything to

hurt the system. At worst, the command won't do what you want it to do. But

as I'm discussing with MEB, I'm not clear that some command in autoexec.bat

can do what you want.

 

As stated, you want to log when bootup finishes and when shutdown commences.

Is this a secure system that you have to keep kids from messing with, for

instance?

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

\

"PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

> Not being a computer whiz, I am a little reluctant to mess with the

> autoexec.bat file. What happens if I make a typo error when modifying the

> autoexec.bat file? Will my PC fail to boot? Then what?

>

> "Gary S. Terhune" wrote:

>

>> It's difficult to pin down when boot up is "finished", but a rough

>> estimate

>> is provided by a script in the Startup folder. For shutdown, you use a

>> script to initiate shutdown. Both scripts write the date/time to a

>> single,

>> mutual file.

>>

>> How's that for an idea? I even have most of the code written. But you've

>> been given a lot of info already, with no seeming result. What's wrong

>> with

>> the solutions already provided in this forum?

>>

>> --

>> Gary S. Terhune

>> MS-MVP Shell/User

>> http://www.grystmill.com

>>

>> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

>> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

>> >I would like to produce a (text) file that shows when (date & time)

>> >bootup

>> >is

>> > completed and when shutdown is initiated. The file needs to append

>> > itself

>> > everytime bootup and shutdown occurs, i.e the file grows bigger with

>> > time.

>> > For example, over a year period the file will probably have many

>> > hundreds

>> > of

>> > entries in it. The program must NOT delete previous entries. Any

>> > suggestions?

>>

>>

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Anyway, I just finished a whole set of scripts and shortcuts that will do

what you want. I can even put them into an installer so you don't have to

worry about mistakes. Or are you familiar enough with computers to, say, put

a couple of files into the C:\ folder, on into the Startup folder, etc.?

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

> Not being a computer whiz, I am a little reluctant to mess with the

> autoexec.bat file. What happens if I make a typo error when modifying the

> autoexec.bat file? Will my PC fail to boot? Then what?

>

> "Gary S. Terhune" wrote:

>

>> It's difficult to pin down when boot up is "finished", but a rough

>> estimate

>> is provided by a script in the Startup folder. For shutdown, you use a

>> script to initiate shutdown. Both scripts write the date/time to a

>> single,

>> mutual file.

>>

>> How's that for an idea? I even have most of the code written. But you've

>> been given a lot of info already, with no seeming result. What's wrong

>> with

>> the solutions already provided in this forum?

>>

>> --

>> Gary S. Terhune

>> MS-MVP Shell/User

>> http://www.grystmill.com

>>

>> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

>> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

>> >I would like to produce a (text) file that shows when (date & time)

>> >bootup

>> >is

>> > completed and when shutdown is initiated. The file needs to append

>> > itself

>> > everytime bootup and shutdown occurs, i.e the file grows bigger with

>> > time.

>> > For example, over a year period the file will probably have many

>> > hundreds

>> > of

>> > entries in it. The program must NOT delete previous entries. Any

>> > suggestions?

>>

>>

Posted

Re: Bootup - Shutdown logger

 

Okay, let me reply here. If you finished the scripts and other, is there a

link for testing these [no installer yet please]?

 

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

"Gary S. Terhune" <none> wrote in message

news:eZeTrhWoIHA.3652@TK2MSFTNGP03.phx.gbl...

| Anyway, I just finished a whole set of scripts and shortcuts that will do

| what you want. I can even put them into an installer so you don't have to

| worry about mistakes. Or are you familiar enough with computers to, say,

put

| a couple of files into the C:\ folder, on into the Startup folder, etc.?

|

| --

| Gary S. Terhune

| MS-MVP Shell/User

| http://www.grystmill.com

|

| "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

| > Not being a computer whiz, I am a little reluctant to mess with the

| > autoexec.bat file. What happens if I make a typo error when modifying

the

| > autoexec.bat file? Will my PC fail to boot? Then what?

| >

| > "Gary S. Terhune" wrote:

| >

| >> It's difficult to pin down when boot up is "finished", but a rough

| >> estimate

| >> is provided by a script in the Startup folder. For shutdown, you use a

| >> script to initiate shutdown. Both scripts write the date/time to a

| >> single,

| >> mutual file.

| >>

| >> How's that for an idea? I even have most of the code written. But

you've

| >> been given a lot of info already, with no seeming result. What's wrong

| >> with

| >> the solutions already provided in this forum?

| >>

| >> --

| >> Gary S. Terhune

| >> MS-MVP Shell/User

| >> http://www.grystmill.com

| >>

| >> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| >> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| >> >I would like to produce a (text) file that shows when (date & time)

| >> >bootup

| >> >is

| >> > completed and when shutdown is initiated. The file needs to append

| >> > itself

| >> > everytime bootup and shutdown occurs, i.e the file grows bigger with

| >> > time.

| >> > For example, over a year period the file will probably have many

| >> > hundreds

| >> > of

| >> > entries in it. The program must NOT delete previous entries. Any

| >> > suggestions?

| >>

| >>

|

Posted

Re: Bootup - Shutdown logger

 

Its Franc's code, let him explain.

 

Like I said, I would install one of the available third party programs [for

those not wanting policies and other] to completely monitor access,

password protected and required for entry, encrypted, complete logged

activity if desired including hack attempts or failed logins, and several

other.

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

"Gary S. Terhune" <none> wrote in message

news:%23yqjB$VoIHA.420@TK2MSFTNGP02.phx.gbl...

| Nothing you put in autoexec.bat is going to tell you when boot "finishes."

|

| I'm lost. What was the recommended autoexec.bat command? Was it just to

put

| a timestamp in a log?

|

| --

| Gary S. Terhune

| MS-MVP Shell/User

| http://www.grystmill.com

|

| "MEB" <meb@not here@hotmail.com> wrote in message

| news:O62cIASoIHA.1740@TK2MSFTNGP05.phx.gbl...

| > Franc was careful enough: that seemed to be correct and intact when

| > posted.

| > A cut and paste of the lines into a text editor, and saving the file as

>

| > test.bat < would allow you to test without any difficulties. Just click

| > on

| > the bat you created in Explorer, and look in the folder at the created

| > text

| > file to see if it contains what you want [or use the RUN box or MSDOS

| > prompt]. If it suits your purposes, then add the lines into the

| > autoexec.bat

| > by cutting and pasting there. NOTE: place them at the end of the Batch.

| >

| > If you mess up the test.bat, then nothing untoward will occur while

| > testing.

| >

| > --

| > MEB http://peoplescounsel.orgfree.com

| > --

| > _________

| >

| >

| > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > news:704CE063-2A48-449D-877D-E43FC254942F@microsoft.com...

| > | Not being a computer whiz, I am a little reluctant to mess with the

| > | autoexec.bat file. What happens if I make a typo error when modifying

| > the

| > | autoexec.bat file? Will my PC fail to boot? Then what?

| > |

| > | "MEB" wrote:

| > |

| > | > This was just discussed in *Elapsed time meter*

| > | >

| > | > See Franc's second message [04-14-08] for autoexec.bat entries to

| > create a

| > | > text file.

| > | >

| > | > --

| > | > MEB http://peoplescounsel.orgfree.com

| > | > --

| > | > _________

| > | >

| > | > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > | > news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| > | > | I would like to produce a (text) file that shows when (date &

time)

| > bootup

| > | > is

| > | > | completed and when shutdown is initiated. The file needs to

append

| > itself

| > | > | everytime bootup and shutdown occurs, i.e the file grows bigger

with

| > time.

| > | > | For example, over a year period the file will probably have many

| > hundreds

| > | > of

| > | > | entries in it. The program must NOT delete previous entries. Any

| > | > | suggestions?

| > | >

| > | >

| > | >

| >

| >

|

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Yeah, so would I.

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"MEB" <meb@not here@hotmail.com> wrote in message

news:Ot913vXoIHA.5016@TK2MSFTNGP02.phx.gbl...

> Its Franc's code, let him explain.

>

> Like I said, I would install one of the available third party programs

> [for

> those not wanting policies and other] to completely monitor access,

> password protected and required for entry, encrypted, complete logged

> activity if desired including hack attempts or failed logins, and several

> other.

>

> --

> MEB http://peoplescounsel.orgfree.com

> --

> _________

>

> "Gary S. Terhune" <none> wrote in message

> news:%23yqjB$VoIHA.420@TK2MSFTNGP02.phx.gbl...

> | Nothing you put in autoexec.bat is going to tell you when boot

> "finishes."

> |

> | I'm lost. What was the recommended autoexec.bat command? Was it just to

> put

> | a timestamp in a log?

> |

> | --

> | Gary S. Terhune

> | MS-MVP Shell/User

> | http://www.grystmill.com

> |

> | "MEB" <meb@not here@hotmail.com> wrote in message

> | news:O62cIASoIHA.1740@TK2MSFTNGP05.phx.gbl...

> | > Franc was careful enough: that seemed to be correct and intact when

> | > posted.

> | > A cut and paste of the lines into a text editor, and saving the file

> as

>>

> | > test.bat < would allow you to test without any difficulties. Just

> click

> | > on

> | > the bat you created in Explorer, and look in the folder at the created

> | > text

> | > file to see if it contains what you want [or use the RUN box or MSDOS

> | > prompt]. If it suits your purposes, then add the lines into the

> | > autoexec.bat

> | > by cutting and pasting there. NOTE: place them at the end of the

> Batch.

> | >

> | > If you mess up the test.bat, then nothing untoward will occur while

> | > testing.

> | >

> | > --

> | > MEB http://peoplescounsel.orgfree.com

> | > --

> | > _________

> | >

> | >

> | > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | > news:704CE063-2A48-449D-877D-E43FC254942F@microsoft.com...

> | > | Not being a computer whiz, I am a little reluctant to mess with the

> | > | autoexec.bat file. What happens if I make a typo error when

> modifying

> | > the

> | > | autoexec.bat file? Will my PC fail to boot? Then what?

> | > |

> | > | "MEB" wrote:

> | > |

> | > | > This was just discussed in *Elapsed time meter*

> | > | >

> | > | > See Franc's second message [04-14-08] for autoexec.bat entries to

> | > create a

> | > | > text file.

> | > | >

> | > | > --

> | > | > MEB http://peoplescounsel.orgfree.com

> | > | > --

> | > | > _________

> | > | >

> | > | > "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | > | > news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> | > | > | I would like to produce a (text) file that shows when (date &

> time)

> | > bootup

> | > | > is

> | > | > | completed and when shutdown is initiated. The file needs to

> append

> | > itself

> | > | > | everytime bootup and shutdown occurs, i.e the file grows bigger

> with

> | > time.

> | > | > | For example, over a year period the file will probably have many

> | > hundreds

> | > | > of

> | > | > | entries in it. The program must NOT delete previous entries.

> Any

> | > | > | suggestions?

> | > | >

> | > | >

> | > | >

> | >

> | >

> |

>

>

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

No, I'll post the code here, between lines of asterisks.

 

"StartTime.vbs"

****************************

Option Explicit

Dim fso, f

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

f.WriteLine "Start " & now

f.Close

WScript.Quit

******************************

 

"Shutdown.vbs"

*****************************

Option Explicit

Dim fso, f, wso

Set wso = WScript.CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

f.WriteLine now

f.Close

wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

********************************

 

""Restart.vbs"

*******************************

Option Explicit

Dim fso, f, wso

Set wso = WScript.CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

f.WriteLine now

f.Close

wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 2"

********************************

 

"Logoff.vbs"

*******************************

Option Explicit

Dim fso, f, wso

Set wso = WScript.CreateObject("WScript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

f.WriteLine now

f.Close

wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 0"

*********************************

 

Place StartTime.vbs into the Startup folder. Place the other three into the

C:\ root folder. "C:\Uptime.txt" is the log. I'd place shortcuts to the

shutdown scripts and the log onto the Desktop.

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

 

"MEB" <meb@not here@hotmail.com> wrote in message

news:%23Dqa0vXoIHA.5016@TK2MSFTNGP02.phx.gbl...

> Okay, let me reply here. If you finished the scripts and other, is there a

> link for testing these [no installer yet please]?

>

>

> --

> MEB http://peoplescounsel.orgfree.com

> --

> _________

>

> "Gary S. Terhune" <none> wrote in message

> news:eZeTrhWoIHA.3652@TK2MSFTNGP03.phx.gbl...

> | Anyway, I just finished a whole set of scripts and shortcuts that will

> do

> | what you want. I can even put them into an installer so you don't have

> to

> | worry about mistakes. Or are you familiar enough with computers to, say,

> put

> | a couple of files into the C:\ folder, on into the Startup folder, etc.?

> |

> | --

> | Gary S. Terhune

> | MS-MVP Shell/User

> | http://www.grystmill.com

> |

> | "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

> | > Not being a computer whiz, I am a little reluctant to mess with the

> | > autoexec.bat file. What happens if I make a typo error when modifying

> the

> | > autoexec.bat file? Will my PC fail to boot? Then what?

> | >

> | > "Gary S. Terhune" wrote:

> | >

> | >> It's difficult to pin down when boot up is "finished", but a rough

> | >> estimate

> | >> is provided by a script in the Startup folder. For shutdown, you use

> a

> | >> script to initiate shutdown. Both scripts write the date/time to a

> | >> single,

> | >> mutual file.

> | >>

> | >> How's that for an idea? I even have most of the code written. But

> you've

> | >> been given a lot of info already, with no seeming result. What's

> wrong

> | >> with

> | >> the solutions already provided in this forum?

> | >>

> | >> --

> | >> Gary S. Terhune

> | >> MS-MVP Shell/User

> | >> http://www.grystmill.com

> | >>

> | >> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | >> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> | >> >I would like to produce a (text) file that shows when (date & time)

> | >> >bootup

> | >> >is

> | >> > completed and when shutdown is initiated. The file needs to append

> | >> > itself

> | >> > everytime bootup and shutdown occurs, i.e the file grows bigger

> with

> | >> > time.

> | >> > For example, over a year period the file will probably have many

> | >> > hundreds

> | >> > of

> | >> > entries in it. The program must NOT delete previous entries. Any

> | >> > suggestions?

> | >>

> | >>

> |

>

>

Posted

Re: Bootup - Shutdown logger

 

 

"Gary S. Terhune" <none> wrote in message

news:ueoHUCaoIHA.4760@TK2MSFTNGP06.phx.gbl...

| No, I'll post the code here, between lines of asterisks.

|

| "StartTime.vbs"

| ****************************

| Option Explicit

| Dim fso, f

| Set fso = CreateObject("Scripting.FileSystemObject")

| Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| f.WriteLine "Start " & now

| f.Close

| WScript.Quit

| ******************************

|

| "Shutdown.vbs"

| *****************************

| Option Explicit

| Dim fso, f, wso

| Set wso = WScript.CreateObject("WScript.Shell")

| Set fso = CreateObject("Scripting.FileSystemObject")

| Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| f.WriteLine now

| f.Close

| wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

| ********************************

|

| ""Restart.vbs"

| *******************************

| Option Explicit

| Dim fso, f, wso

| Set wso = WScript.CreateObject("WScript.Shell")

| Set fso = CreateObject("Scripting.FileSystemObject")

| Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| f.WriteLine now

| f.Close

| wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 2"

| ********************************

|

| "Logoff.vbs"

| *******************************

| Option Explicit

| Dim fso, f, wso

| Set wso = WScript.CreateObject("WScript.Shell")

| Set fso = CreateObject("Scripting.FileSystemObject")

| Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| f.WriteLine now

| f.Close

| wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 0"

| *********************************

|

| Place StartTime.vbs into the Startup folder. Place the other three into

the

| C:\ root folder. "C:\Uptime.txt" is the log. I'd place shortcuts to the

| shutdown scripts and the log onto the Desktop.

|

| --

| Gary S. Terhune

| MS-MVP Shell/User

| http://www.grystmill.com

|

 

 

 

Okay, tested shutdown and startup vbs. Not sure if this is accurate, but

apparently the desire is to monitor ALL log times [like in a networked

server/work station environment or multi-user environment {tracking kids

usage}].

How do you intend to ensure that a user MUST use these to logoff or

shutdown, hence creating an accurate and complete log for usage tracking

purposes, and ensure that the Startup vbs is not removed from Startup?

 

The poster also wished TOTAL runtime output logged [as in other apparent

users; apparently for comparison to cumulative logged activity]. The

suggestion was to compare SMART values [hard drive runtime hours].

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

 

|

| "MEB" <meb@not here@hotmail.com> wrote in message

| news:%23Dqa0vXoIHA.5016@TK2MSFTNGP02.phx.gbl...

| > Okay, let me reply here. If you finished the scripts and other, is there

a

| > link for testing these [no installer yet please]?

| >

| >

| > --

| > MEB http://peoplescounsel.orgfree.com

| > --

| > _________

| >

| > "Gary S. Terhune" <none> wrote in message

| > news:eZeTrhWoIHA.3652@TK2MSFTNGP03.phx.gbl...

| > | Anyway, I just finished a whole set of scripts and shortcuts that will

| > do

| > | what you want. I can even put them into an installer so you don't have

| > to

| > | worry about mistakes. Or are you familiar enough with computers to,

say,

| > put

| > | a couple of files into the C:\ folder, on into the Startup folder,

etc.?

| > |

| > | --

| > | Gary S. Terhune

| > | MS-MVP Shell/User

| > | http://www.grystmill.com

| > |

| > | "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > | news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

| > | > Not being a computer whiz, I am a little reluctant to mess with the

| > | > autoexec.bat file. What happens if I make a typo error when

modifying

| > the

| > | > autoexec.bat file? Will my PC fail to boot? Then what?

| > | >

| > | > "Gary S. Terhune" wrote:

| > | >

| > | >> It's difficult to pin down when boot up is "finished", but a rough

| > | >> estimate

| > | >> is provided by a script in the Startup folder. For shutdown, you

use

| > a

| > | >> script to initiate shutdown. Both scripts write the date/time to a

| > | >> single,

| > | >> mutual file.

| > | >>

| > | >> How's that for an idea? I even have most of the code written. But

| > you've

| > | >> been given a lot of info already, with no seeming result. What's

| > wrong

| > | >> with

| > | >> the solutions already provided in this forum?

| > | >>

| > | >> --

| > | >> Gary S. Terhune

| > | >> MS-MVP Shell/User

| > | >> http://www.grystmill.com

| > | >>

| > | >> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > | >> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| > | >> >I would like to produce a (text) file that shows when (date &

time)

| > | >> >bootup

| > | >> >is

| > | >> > completed and when shutdown is initiated. The file needs to

append

| > | >> > itself

| > | >> > everytime bootup and shutdown occurs, i.e the file grows bigger

| > with

| > | >> > time.

| > | >> > For example, over a year period the file will probably have many

| > | >> > hundreds

| > | >> > of

| > | >> > entries in it. The program must NOT delete previous entries.

Any

| > | >> > suggestions?

| > | >>

| > | >>

| > |

| >

| >

|

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

I've proved the concept, just not actually written all the code, that would

provide individual and cumulative uptime notations added to the log at

shutdown, but I think it might be better to leave the log alone and run a

script on it whenever a report is desired. Depends on end use. You mention

various scenarios. Perhaps the OP could help us pin down the target

environment. Or, perhaps OP has used that code of Franc's and it works just

fine and he just hasn't bothered to report back.

 

Locking down Windows 98 using Doug Knox's methods would be the only way I

know to prevent meddling with the tracking system. Locking down would be

required NO MATTER what tracking method was used if trust of the user(s) is

not complete. Perhaps a combination of POLEDIT and Doug's scripts.

http://www.dougknox.com/security/index.htm, which would be necessary under

those conditions, anyway.

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"MEB" <meb@not here@hotmail.com> wrote in message

news:ujCQpyeoIHA.4760@TK2MSFTNGP06.phx.gbl...

>

> "Gary S. Terhune" <none> wrote in message

> news:ueoHUCaoIHA.4760@TK2MSFTNGP06.phx.gbl...

> | No, I'll post the code here, between lines of asterisks.

> |

> | "StartTime.vbs"

> | ****************************

> | Option Explicit

> | Dim fso, f

> | Set fso = CreateObject("Scripting.FileSystemObject")

> | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

> | f.WriteLine "Start " & now

> | f.Close

> | WScript.Quit

> | ******************************

> |

> | "Shutdown.vbs"

> | *****************************

> | Option Explicit

> | Dim fso, f, wso

> | Set wso = WScript.CreateObject("WScript.Shell")

> | Set fso = CreateObject("Scripting.FileSystemObject")

> | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

> | f.WriteLine now

> | f.Close

> | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

> | ********************************

> |

> | ""Restart.vbs"

> | *******************************

> | Option Explicit

> | Dim fso, f, wso

> | Set wso = WScript.CreateObject("WScript.Shell")

> | Set fso = CreateObject("Scripting.FileSystemObject")

> | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

> | f.WriteLine now

> | f.Close

> | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 2"

> | ********************************

> |

> | "Logoff.vbs"

> | *******************************

> | Option Explicit

> | Dim fso, f, wso

> | Set wso = WScript.CreateObject("WScript.Shell")

> | Set fso = CreateObject("Scripting.FileSystemObject")

> | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

> | f.WriteLine now

> | f.Close

> | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 0"

> | *********************************

> |

> | Place StartTime.vbs into the Startup folder. Place the other three into

> the

> | C:\ root folder. "C:\Uptime.txt" is the log. I'd place shortcuts to the

> | shutdown scripts and the log onto the Desktop.

> |

> | --

> | Gary S. Terhune

> | MS-MVP Shell/User

> | http://www.grystmill.com

> |

>

>

>

> Okay, tested shutdown and startup vbs. Not sure if this is accurate, but

> apparently the desire is to monitor ALL log times [like in a networked

> server/work station environment or multi-user environment {tracking kids

> usage}].

> How do you intend to ensure that a user MUST use these to logoff or

> shutdown, hence creating an accurate and complete log for usage tracking

> purposes, and ensure that the Startup vbs is not removed from Startup?

>

> The poster also wished TOTAL runtime output logged [as in other apparent

> users; apparently for comparison to cumulative logged activity]. The

> suggestion was to compare SMART values [hard drive runtime hours].

>

> --

> MEB http://peoplescounsel.orgfree.com

> --

> _________

>

>

> |

> | "MEB" <meb@not here@hotmail.com> wrote in message

> | news:%23Dqa0vXoIHA.5016@TK2MSFTNGP02.phx.gbl...

> | > Okay, let me reply here. If you finished the scripts and other, is

> there

> a

> | > link for testing these [no installer yet please]?

> | >

> | >

> | > --

> | > MEB http://peoplescounsel.orgfree.com

> | > --

> | > _________

> | >

> | > "Gary S. Terhune" <none> wrote in message

> | > news:eZeTrhWoIHA.3652@TK2MSFTNGP03.phx.gbl...

> | > | Anyway, I just finished a whole set of scripts and shortcuts that

> will

> | > do

> | > | what you want. I can even put them into an installer so you don't

> have

> | > to

> | > | worry about mistakes. Or are you familiar enough with computers to,

> say,

> | > put

> | > | a couple of files into the C:\ folder, on into the Startup folder,

> etc.?

> | > |

> | > | --

> | > | Gary S. Terhune

> | > | MS-MVP Shell/User

> | > | http://www.grystmill.com

> | > |

> | > | "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

> | > | news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

> | > | > Not being a computer whiz, I am a little reluctant to mess with

> the

> | > | > autoexec.bat file. What happens if I make a typo error when

> modifying

> | > the

> | > | > autoexec.bat file? Will my PC fail to boot? Then what?

> | > | >

> | > | > "Gary S. Terhune" wrote:

> | > | >

> | > | >> It's difficult to pin down when boot up is "finished", but a

> rough

> | > | >> estimate

> | > | >> is provided by a script in the Startup folder. For shutdown, you

> use

> | > a

> | > | >> script to initiate shutdown. Both scripts write the date/time to

> a

> | > | >> single,

> | > | >> mutual file.

> | > | >>

> | > | >> How's that for an idea? I even have most of the code written. But

> | > you've

> | > | >> been given a lot of info already, with no seeming result. What's

> | > wrong

> | > | >> with

> | > | >> the solutions already provided in this forum?

> | > | >>

> | > | >> --

> | > | >> Gary S. Terhune

> | > | >> MS-MVP Shell/User

> | > | >> http://www.grystmill.com

> | > | >>

> | > | >> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in

> message

> | > | >> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

> | > | >> >I would like to produce a (text) file that shows when (date &

> time)

> | > | >> >bootup

> | > | >> >is

> | > | >> > completed and when shutdown is initiated. The file needs to

> append

> | > | >> > itself

> | > | >> > everytime bootup and shutdown occurs, i.e the file grows bigger

> | > with

> | > | >> > time.

> | > | >> > For example, over a year period the file will probably have

> many

> | > | >> > hundreds

> | > | >> > of

> | > | >> > entries in it. The program must NOT delete previous entries.

> Any

> | > | >> > suggestions?

> | > | >>

> | > | >>

> | > |

> | >

> | >

> |

>

>

Posted

Re: Bootup - Shutdown logger

 

Okay, let's see if PSRumbagh can verify exactly what the target for

security is or if that is necessary, and whether either presented technique

provides what they need..

 

--

MEB http://peoplescounsel.orgfree.com

--

_________

 

"Gary S. Terhune" <none> wrote in message

news:eaMssDjoIHA.5016@TK2MSFTNGP02.phx.gbl...

| I've proved the concept, just not actually written all the code, that

would

| provide individual and cumulative uptime notations added to the log at

| shutdown, but I think it might be better to leave the log alone and run a

| script on it whenever a report is desired. Depends on end use. You mention

| various scenarios. Perhaps the OP could help us pin down the target

| environment. Or, perhaps OP has used that code of Franc's and it works

just

| fine and he just hasn't bothered to report back.

|

| Locking down Windows 98 using Doug Knox's methods would be the only way I

| know to prevent meddling with the tracking system. Locking down would be

| required NO MATTER what tracking method was used if trust of the user(s)

is

| not complete. Perhaps a combination of POLEDIT and Doug's scripts.

| http://www.dougknox.com/security/index.htm, which would be necessary under

| those conditions, anyway.

|

| --

| Gary S. Terhune

| MS-MVP Shell/User

| http://www.grystmill.com

|

| "MEB" <meb@not here@hotmail.com> wrote in message

| news:ujCQpyeoIHA.4760@TK2MSFTNGP06.phx.gbl...

| >

| > "Gary S. Terhune" <none> wrote in message

| > news:ueoHUCaoIHA.4760@TK2MSFTNGP06.phx.gbl...

| > | No, I'll post the code here, between lines of asterisks.

| > |

| > | "StartTime.vbs"

| > | ****************************

| > | Option Explicit

| > | Dim fso, f

| > | Set fso = CreateObject("Scripting.FileSystemObject")

| > | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| > | f.WriteLine "Start " & now

| > | f.Close

| > | WScript.Quit

| > | ******************************

| > |

| > | "Shutdown.vbs"

| > | *****************************

| > | Option Explicit

| > | Dim fso, f, wso

| > | Set wso = WScript.CreateObject("WScript.Shell")

| > | Set fso = CreateObject("Scripting.FileSystemObject")

| > | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| > | f.WriteLine now

| > | f.Close

| > | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

| > | ********************************

| > |

| > | ""Restart.vbs"

| > | *******************************

| > | Option Explicit

| > | Dim fso, f, wso

| > | Set wso = WScript.CreateObject("WScript.Shell")

| > | Set fso = CreateObject("Scripting.FileSystemObject")

| > | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| > | f.WriteLine now

| > | f.Close

| > | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 2"

| > | ********************************

| > |

| > | "Logoff.vbs"

| > | *******************************

| > | Option Explicit

| > | Dim fso, f, wso

| > | Set wso = WScript.CreateObject("WScript.Shell")

| > | Set fso = CreateObject("Scripting.FileSystemObject")

| > | Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

| > | f.WriteLine now

| > | f.Close

| > | wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 0"

| > | *********************************

| > |

| > | Place StartTime.vbs into the Startup folder. Place the other three

into

| > the

| > | C:\ root folder. "C:\Uptime.txt" is the log. I'd place shortcuts to

the

| > | shutdown scripts and the log onto the Desktop.

| > |

| > | --

| > | Gary S. Terhune

| > | MS-MVP Shell/User

| > | http://www.grystmill.com

| > |

| >

| >

| >

| > Okay, tested shutdown and startup vbs. Not sure if this is accurate, but

| > apparently the desire is to monitor ALL log times [like in a networked

| > server/work station environment or multi-user environment {tracking

kids

| > usage}].

| > How do you intend to ensure that a user MUST use these to logoff or

| > shutdown, hence creating an accurate and complete log for usage tracking

| > purposes, and ensure that the Startup vbs is not removed from Startup?

| >

| > The poster also wished TOTAL runtime output logged [as in other apparent

| > users; apparently for comparison to cumulative logged activity]. The

| > suggestion was to compare SMART values [hard drive runtime hours].

| >

| > --

| > MEB http://peoplescounsel.orgfree.com

| > --

| > _________

| >

| >

| > |

| > | "MEB" <meb@not here@hotmail.com> wrote in message

| > | news:%23Dqa0vXoIHA.5016@TK2MSFTNGP02.phx.gbl...

| > | > Okay, let me reply here. If you finished the scripts and other, is

| > there

| > a

| > | > link for testing these [no installer yet please]?

| > | >

| > | >

| > | > --

| > | > MEB http://peoplescounsel.orgfree.com

| > | > --

| > | > _________

| > | >

| > | > "Gary S. Terhune" <none> wrote in message

| > | > news:eZeTrhWoIHA.3652@TK2MSFTNGP03.phx.gbl...

| > | > | Anyway, I just finished a whole set of scripts and shortcuts that

| > will

| > | > do

| > | > | what you want. I can even put them into an installer so you don't

| > have

| > | > to

| > | > | worry about mistakes. Or are you familiar enough with computers

to,

| > say,

| > | > put

| > | > | a couple of files into the C:\ folder, on into the Startup folder,

| > etc.?

| > | > |

| > | > | --

| > | > | Gary S. Terhune

| > | > | MS-MVP Shell/User

| > | > | http://www.grystmill.com

| > | > |

| > | > | "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in message

| > | > | news:B4A5F84B-1891-4B49-8AE1-22E3E76FA7E2@microsoft.com...

| > | > | > Not being a computer whiz, I am a little reluctant to mess with

| > the

| > | > | > autoexec.bat file. What happens if I make a typo error when

| > modifying

| > | > the

| > | > | > autoexec.bat file? Will my PC fail to boot? Then what?

| > | > | >

| > | > | > "Gary S. Terhune" wrote:

| > | > | >

| > | > | >> It's difficult to pin down when boot up is "finished", but a

| > rough

| > | > | >> estimate

| > | > | >> is provided by a script in the Startup folder. For shutdown,

you

| > use

| > | > a

| > | > | >> script to initiate shutdown. Both scripts write the date/time

to

| > a

| > | > | >> single,

| > | > | >> mutual file.

| > | > | >>

| > | > | >> How's that for an idea? I even have most of the code written.

But

| > | > you've

| > | > | >> been given a lot of info already, with no seeming result.

What's

| > | > wrong

| > | > | >> with

| > | > | >> the solutions already provided in this forum?

| > | > | >>

| > | > | >> --

| > | > | >> Gary S. Terhune

| > | > | >> MS-MVP Shell/User

| > | > | >> http://www.grystmill.com

| > | > | >>

| > | > | >> "PSRumbagh" <PSRumbagh@discussions.microsoft.com> wrote in

| > message

| > | > | >> news:6509B7DE-669E-423D-BA68-0715655A5F5D@microsoft.com...

| > | > | >> >I would like to produce a (text) file that shows when (date &

| > time)

| > | > | >> >bootup

| > | > | >> >is

| > | > | >> > completed and when shutdown is initiated. The file needs to

| > append

| > | > | >> > itself

| > | > | >> > everytime bootup and shutdown occurs, i.e the file grows

bigger

| > | > with

| > | > | >> > time.

| > | > | >> > For example, over a year period the file will probably have

| > many

| > | > | >> > hundreds

| > | > | >> > of

| > | > | >> > entries in it. The program must NOT delete previous entries.

| > Any

| > | > | >> > suggestions?

| > | > | >>

| > | > | >>

| > | > |

| > | >

| > | >

| > |

| >

| >

|

Guest Franc Zabkar
Posted

Re: Bootup - Shutdown logger

 

On Fri, 18 Apr 2008 15:06:16 -0700, "Gary S. Terhune" <none> put

finger to keyboard and composed:

>No, I'll post the code here, between lines of asterisks.

>

>"StartTime.vbs"

>****************************

>Option Explicit

>Dim fso, f

>Set fso = CreateObject("Scripting.FileSystemObject")

>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

>f.WriteLine "Start " & now

>f.Close

>WScript.Quit

>******************************

>

>"Shutdown.vbs"

>*****************************

>Option Explicit

>Dim fso, f, wso

>Set wso = WScript.CreateObject("WScript.Shell")

>Set fso = CreateObject("Scripting.FileSystemObject")

>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

>f.WriteLine "Shutdown" & now

^^^^^^^^^^^^

>f.Close

>wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

>********************************

 

I'm no programmer, but have you forgotten to add explanatory notes (eg

Shutdown, Restart, Logoff) to the date/time stamps in the respective

scripts?

 

BTW, I get a VBScript runtime error in line 3 of StartTime.vbs:

 

ActiveX component can't create object 'Scripting.FileSystemObject'

Code: 800A01AD

 

Does this mean that I am missing some component or that my permissions

are set incorrectly?

 

- Franc Zabkar

--

Please remove one 'i' from my address when replying by email.

Guest Franc Zabkar
Posted

Re: Bootup - Shutdown logger

 

On Sat, 19 Apr 2008 08:18:37 -0700, "Gary S. Terhune" <none> put

finger to keyboard and composed:

>I've proved the concept, just not actually written all the code, that would

>provide individual and cumulative uptime notations added to the log at

>shutdown, but I think it might be better to leave the log alone and run a

>script on it whenever a report is desired. Depends on end use. You mention

>various scenarios. Perhaps the OP could help us pin down the target

>environment. Or, perhaps OP has used that code of Franc's and it works just

>fine and he just hasn't bothered to report back.

 

My simplistic shutdown code does not log restarts, so from that point

of view your approach is better.

 

I primarily use my method because I have a lot of automatic

housekeeping tasks that execute just prior to shutdown, eg check for

changes in critical files and sectors, display new Run components in

registry, display HD SMART parameters (reallocated sectors), etc.

Aside from the fact that I don't know how to achieve the same end

within the GUI, the added benefit from doing this at the DOS command

line is that malware may not remain memory resident once one exits the

GUI.

 

- Franc Zabkar

--

Please remove one 'i' from my address when replying by email.

Posted

Re: Bootup - Shutdown logger

 

Franc Zabkar wrote:

| On Fri, 18 Apr 2008 15:06:16 -0700, "Gary S. Terhune" <none> put

| finger to keyboard and composed:

|

|>No, I'll post the code here, between lines of asterisks.

|>

|>"StartTime.vbs"

|>****************************

|>Option Explicit

|>Dim fso, f

|>Set fso = CreateObject("Scripting.FileSystemObject")

|>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

|>f.WriteLine "Start " & now

|>f.Close

|>WScript.Quit

|>******************************

|>

|>"Shutdown.vbs"

|>*****************************

|>Option Explicit

|>Dim fso, f, wso

|>Set wso = WScript.CreateObject("WScript.Shell")

|>Set fso = CreateObject("Scripting.FileSystemObject")

|>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

|>f.WriteLine "Shutdown" & now

| ^^^^^^^^^^^^

|

|>f.Close

|>wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

|>********************************

|

| I'm no programmer, but have you forgotten to add explanatory notes (eg

| Shutdown, Restart, Logoff) to the date/time stamps in the respective

| scripts?

|

| BTW, I get a VBScript runtime error in line 3 of StartTime.vbs:

 

It worked for me & produced "Start 4/19/08 11:39:16 PM" in UpTime.txt.

 

| ActiveX component can't create object 'Scripting.FileSystemObject'

| Code: 800A01AD

|

| Does this mean that I am missing some component or that my permissions

| are set incorrectly?

 

Can it be you need to update your scripting engine?

 

(But I have failed to remember or discover how to do that. All I have

are these three URLs...

http://msdn2.microsoft.com/en-us/library/t0aew7h6.aspx

VBScript User Manual

http://msdn2.microsoft.com/en-us/library/9bbdkx3k.aspx

More VBScript User Manual

http://www.billsway.com/vbspage/

Windows VBScript Tools

)

 

| - Franc Zabkar

| --

| Please remove one 'i' from my address when replying by email.

 

--

Thanks or Good Luck,

There may be humor in this post, and,

Naturally, you will not sue,

Should things get worse after this,

PCR

pcrrcp@netzero.net

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Log lines start with "Start ..." and "Shutdown...". I could make the

Shutdown line represent whether shutdown, restart or logoff. But I don't see

the need, and it makes further coding of uptime calculations fairly more

complicated. As for your error, I can't say for sure, but it wouldn't hurt

to reinstall VB runtimes. http://support.microsoft.com/kb/290887/ But it may

be that you have some protective settings or utility getting in the way.

That IS the main drawback of an app based upon scripts.

 

You might also reinstall the Windows Scripting Host. Last version is 5.6

(SCR56EN.EXE) but you can't find it at MS anymore, so here's a copy:

http://grystmill.com/shared/scr56en.exe

 

In case the other download also causes problems,

http://grystmill.com/shared/vbrun60sp6.exe

or http://grystmill.com/shared/vbrun60sp5.exe

 

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"Franc Zabkar" <fzabkar@iinternode.on.net> wrote in message

news:bgik041uuqgcpc3iqnjcu48qgmnp7h97no@4ax.com...

> On Fri, 18 Apr 2008 15:06:16 -0700, "Gary S. Terhune" <none> put

> finger to keyboard and composed:

>

>>No, I'll post the code here, between lines of asterisks.

>>

>>"StartTime.vbs"

>>****************************

>>Option Explicit

>>Dim fso, f

>>Set fso = CreateObject("Scripting.FileSystemObject")

>>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

>>f.WriteLine "Start " & now

>>f.Close

>>WScript.Quit

>>******************************

>>

>>"Shutdown.vbs"

>>*****************************

>>Option Explicit

>>Dim fso, f, wso

>>Set wso = WScript.CreateObject("WScript.Shell")

>>Set fso = CreateObject("Scripting.FileSystemObject")

>>Set f = fso.OpenTextFile("C:\uptime.txt", 8, True)

>>f.WriteLine "Shutdown" & now

> ^^^^^^^^^^^^

>

>>f.Close

>>wso.run "C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx 9"

>>********************************

>

> I'm no programmer, but have you forgotten to add explanatory notes (eg

> Shutdown, Restart, Logoff) to the date/time stamps in the respective

> scripts?

>

> BTW, I get a VBScript runtime error in line 3 of StartTime.vbs:

>

> ActiveX component can't create object 'Scripting.FileSystemObject'

> Code: 800A01AD

>

> Does this mean that I am missing some component or that my permissions

> are set incorrectly?

>

> - Franc Zabkar

> --

> Please remove one 'i' from my address when replying by email.

Guest Franc Zabkar
Posted

Re: Bootup - Shutdown logger

 

On Sun, 20 Apr 2008 00:13:31 -0400, "PCR" <pcrrcp@netzero.net> put

finger to keyboard and composed:

>Franc Zabkar wrote:

>| BTW, I get a VBScript runtime error in line 3 of StartTime.vbs:

>

>It worked for me & produced "Start 4/19/08 11:39:16 PM" in UpTime.txt.

>

>| ActiveX component can't create object 'Scripting.FileSystemObject'

>| Code: 800A01AD

>|

>| Does this mean that I am missing some component or that my permissions

>| are set incorrectly?

>

>Can it be you need to update your scripting engine?

 

It was already up to date.

>(But I have failed to remember or discover how to do that. All I have

>are these three URLs...

>http://msdn2.microsoft.com/en-us/library/t0aew7h6.aspx

>VBScript User Manual

>http://msdn2.microsoft.com/en-us/library/9bbdkx3k.aspx

>More VBScript User Manual

>http://www.billsway.com/vbspage/

>Windows VBScript Tools

 

Last week I bought "MS VBscript - Step by Step", Microsoft Press.

 

- Franc Zabkar

--

Please remove one 'i' from my address when replying by email.

Guest Franc Zabkar
Posted

Re: Bootup - Shutdown logger

 

On Sun, 20 Apr 2008 00:31:38 -0700, "Gary S. Terhune" <none> put

finger to keyboard and composed:

>Log lines start with "Start ..." and "Shutdown...". I could make the

>Shutdown line represent whether shutdown, restart or logoff. But I don't see

>the need, and it makes further coding of uptime calculations fairly more

>complicated. As for your error, I can't say for sure, but it wouldn't hurt

>to reinstall VB runtimes. http://support.microsoft.com/kb/290887/ But it may

>be that you have some protective settings or utility getting in the way.

>That IS the main drawback of an app based upon scripts.

>

>You might also reinstall the Windows Scripting Host. Last version is 5.6

>(SCR56EN.EXE) but you can't find it at MS anymore, so here's a copy:

>http://grystmill.com/shared/scr56en.exe

 

My version of wscript.exe was 5.6.0.6626 but I installed it again

anyway. However the error remains.

>In case the other download also causes problems,

>http://grystmill.com/shared/vbrun60sp6.exe

>or http://grystmill.com/shared/vbrun60sp5.exe

 

I seem to already have the latest VB6 runtimes, although several of

the files are later versions of those on the MS site. I believe these

were updated by IE6SP1:

 

ASYCFILT.DLL 2.40.4518

OLEAUT32.DLL 2.40.4518

OLEPRO32.DLL 5.0.4518

STDOLE2.TLB 2.40.4518

 

Anyway I reinstalled vbrun60sp6.exe but the error remains.

 

I have no idea where to look for protective settings and I don't have

any utilities running in the background. FWIW, I have fiddled with the

Intranet settings under Internet Options without success.

 

I think I'll leave this problem for some other time. Thanks.

 

- Franc Zabkar

--

Please remove one 'i' from my address when replying by email.

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Good luck. I don't know why ActiveX is getting involved, which makes me

suspect that it's a fouled up ActiveX.

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"Franc Zabkar" <fzabkar@iinternode.on.net> wrote in message

news:2ncn049s547cj26mh96do4a9ovk9rrdsgu@4ax.com...

> On Sun, 20 Apr 2008 00:31:38 -0700, "Gary S. Terhune" <none> put

> finger to keyboard and composed:

>

>>Log lines start with "Start ..." and "Shutdown...". I could make the

>>Shutdown line represent whether shutdown, restart or logoff. But I don't

>>see

>>the need, and it makes further coding of uptime calculations fairly more

>>complicated. As for your error, I can't say for sure, but it wouldn't hurt

>>to reinstall VB runtimes. http://support.microsoft.com/kb/290887/ But it

>>may

>>be that you have some protective settings or utility getting in the way.

>>That IS the main drawback of an app based upon scripts.

>>

>>You might also reinstall the Windows Scripting Host. Last version is 5.6

>>(SCR56EN.EXE) but you can't find it at MS anymore, so here's a copy:

>>http://grystmill.com/shared/scr56en.exe

>

> My version of wscript.exe was 5.6.0.6626 but I installed it again

> anyway. However the error remains.

>

>>In case the other download also causes problems,

>>http://grystmill.com/shared/vbrun60sp6.exe

>>or http://grystmill.com/shared/vbrun60sp5.exe

>

> I seem to already have the latest VB6 runtimes, although several of

> the files are later versions of those on the MS site. I believe these

> were updated by IE6SP1:

>

> ASYCFILT.DLL 2.40.4518

> OLEAUT32.DLL 2.40.4518

> OLEPRO32.DLL 5.0.4518

> STDOLE2.TLB 2.40.4518

>

> Anyway I reinstalled vbrun60sp6.exe but the error remains.

>

> I have no idea where to look for protective settings and I don't have

> any utilities running in the background. FWIW, I have fiddled with the

> Intranet settings under Internet Options without success.

>

> I think I'll leave this problem for some other time. Thanks.

>

> - Franc Zabkar

> --

> Please remove one 'i' from my address when replying by email.

Guest Gary S. Terhune
Posted

Re: Bootup - Shutdown logger

 

Franc, try using an apostrophe to comment out the first line of that script,

"Option Explicit". I don't think it will help, but I'm just curious

enough...

 

Otherwise, like I say, probably something in ActiveX, which brings to mind

the possibility of an IE Repair or IE overinstall.

 

--

Gary S. Terhune

MS-MVP Shell/User

http://www.grystmill.com

 

"Franc Zabkar" <fzabkar@iinternode.on.net> wrote in message

news:2ncn049s547cj26mh96do4a9ovk9rrdsgu@4ax.com...

> On Sun, 20 Apr 2008 00:31:38 -0700, "Gary S. Terhune" <none> put

> finger to keyboard and composed:

>

>>Log lines start with "Start ..." and "Shutdown...". I could make the

>>Shutdown line represent whether shutdown, restart or logoff. But I don't

>>see

>>the need, and it makes further coding of uptime calculations fairly more

>>complicated. As for your error, I can't say for sure, but it wouldn't hurt

>>to reinstall VB runtimes. http://support.microsoft.com/kb/290887/ But it

>>may

>>be that you have some protective settings or utility getting in the way.

>>That IS the main drawback of an app based upon scripts.

>>

>>You might also reinstall the Windows Scripting Host. Last version is 5.6

>>(SCR56EN.EXE) but you can't find it at MS anymore, so here's a copy:

>>http://grystmill.com/shared/scr56en.exe

>

> My version of wscript.exe was 5.6.0.6626 but I installed it again

> anyway. However the error remains.

>

>>In case the other download also causes problems,

>>http://grystmill.com/shared/vbrun60sp6.exe

>>or http://grystmill.com/shared/vbrun60sp5.exe

>

> I seem to already have the latest VB6 runtimes, although several of

> the files are later versions of those on the MS site. I believe these

> were updated by IE6SP1:

>

> ASYCFILT.DLL 2.40.4518

> OLEAUT32.DLL 2.40.4518

> OLEPRO32.DLL 5.0.4518

> STDOLE2.TLB 2.40.4518

>

> Anyway I reinstalled vbrun60sp6.exe but the error remains.

>

> I have no idea where to look for protective settings and I don't have

> any utilities running in the background. FWIW, I have fiddled with the

> Intranet settings under Internet Options without success.

>

> I think I'll leave this problem for some other time. Thanks.

>

> - Franc Zabkar

> --

> Please remove one 'i' from my address when replying by email.

×
×
  • Create New...