Hi,
I would like reporting when start the windows and when shoot down the windows and would like to write in one excel these datas day by day.
Can somebody help me?
Windows start time and shoot down time Topic is solved
Re: Windows start time and shoot down time
ahk is not good at this, use the startup and shutdown script.
Two written before, Both are vbs scripts.
1. startup script, Put in the startup folder of the start menu.
2. Shutdown script, Use it manually, or by command or something.
Two written before, Both are vbs scripts.
1. startup script, Put in the startup folder of the start menu.
Code: Select all
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile ("c:\StartupShutdownTime.ini", 8, True)
objFile.WriteLine ("startupTime:" & date() & " " & time())
objFile.Close
Code: Select all
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile ("c:\StartupShutdownTime.ini", 8, True)
objFile.WriteLine ("ShutdownTime:" & date() & " " & time())
objFile.Close
CreateObject("WScript.Shell").Run "shutdown /s /t 60"
Re: Windows start time and shoot down time Topic is solved
You could give ahk a chance with this script
![Wink ;)](./images/smilies/icon_e_wink.gif)
Code: Select all
#Persistent
Global LogStartExit := A_ScriptDir "\LogStartExit.txt"
;When starting
FormatTime, TimeStamp, %LongDate%, dd.MM.yyyy, HH:mm:ss
FileAppend, %TimeStamp%: StartTime`r`n, %LogStartExit%
OnExit("MyExit") ;When exit or shutdown
return
MyExit(Reason) {
FormatTime, TimeStamp, %LongDate%, dd.MM.yyyy, HH:mm:ss
FileAppend, %TimeStamp%: %Reason%`r`n, %LogStartExit%
}
F10::ExitApp
Who is online
Users browsing this forum: Google [Bot], Hansielein, Lpanatt and 315 guests