Ok I just did the above and it fixed it on my win 10 Pro with v12 WMC.I changed logon account to local administrator on ehSched service.
PC sleeps , wakes, Records scheduled programed and sleeps again...perfect!
Kurt
Ok I just did the above and it fixed it on my win 10 Pro with v12 WMC.I changed logon account to local administrator on ehSched service.
Code: Select all
WakeEarlyMinutes=10 'change this to how many minutes earlier you want the computer to wake
ScheduledTask="WakeTA" 'change this change the name of the task that wakes the computer
function readFromRegistry (strRegistryKey)
Dim WSHShell, value
On Error Resume Next
Set WSHShell=CreateObject("WScript.Shell")
value=WSHShell.RegRead(strRegistryKey)
readFromRegistry=value
set WSHShell=nothing
end function
Function ConvertToLocalDate(sTime)
Dim od, ad, oShell, atb, offsetMin
Dim sHour, sMinute, sMonth, sDay
Dim ResultDate
od = CDate(Mid(sTime,9,2) & "-" & Mid(STime,6,2) & "-" & Mid(STime,1,4) & " " & Mid(STime,12,8))
Set oShell = CreateObject("WScript.Shell")
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias"
offsetMin = oShell.RegRead(atb)
offsetMin = -(offsetMin+WakeEarlyMinutes)
ad = dateadd("n", offsetMin, od)
sMonth = Month(CDate(ad))
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDay = Day(CDate(ad))
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
sHour = Hour(CDate(ad))
If Len(sHour) = 1 Then
sHour = "0" & sHour
End If
sMinute = Minute(CDate(ad))
If Len(sMinute) = 1 Then
sMinute = "0" & sMinute
End If
ConvertToLocalDate=(sMonth & "/" & sDay & "/" & Year(CDate(ad)))
End Function
Function ConvertToLocalTime(sTime)
Dim od, ad, oShell, atb, offsetMin
Dim sHour, sMinute, sMonth, sDay
Dim ResultDate
od = CDate(Mid(sTime,9,2) & "-" & Mid(STime,6,2) & "-" & Mid(STime,1,4) & " " & Mid(STime,12,8))
Set oShell = CreateObject("WScript.Shell")
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias"
offsetMin = oShell.RegRead(atb)
offsetMin = -(offsetMin+WakeEarlyMinutes)
ad = dateadd("n", offsetMin, od)
sMonth = Month(CDate(ad))
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDay = Day(CDate(ad))
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
sHour = Hour(CDate(ad))
If Len(sHour) = 1 Then
sHour = "0" & sHour
End If
sMinute = Minute(CDate(ad))
If Len(sMinute) = 1 Then
sMinute = "0" & sMinute
End If
ConvertToLocalTime=(sHour & ":" & sMinute)
End Function
NextRecordingAt=readfromRegistry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording\NextRecordingAt")
NextRecordingDate=ConvertToLocalDate(NextRecordingAt)
NextRecordingTime=ConvertToLocalTime(NextRecordingAt)
Set Wshell = WScript.CreateObject("WScript.Shell")
Task=("SCHTASKS /CREATE /F /SC ONCE /TN """ & ScheduledTask& """ /TR ""START"" /SD " & NextRecordingDate & " /ST " & NextRecordingTime)
Wshell.run Task,0,true
Const TASK_UPDATE = &H4
Const TASK_DONT_ADD_PRINCIPAL_ACE = &H10
Dim TaskName, EnableWakeToRun, objTaskService, objRootFolder, objTask, objDefinition
TaskName = ScheduledTask
Set objTaskService = CreateObject("Schedule.Service")
objTaskService.Connect
Set objRootFolder = objTaskService.GetFolder("\")
Set objTask = objRootFolder.GetTask ("\" & TaskName)
Set objDefinition = objTask.Definition
objDefinition.Settings.WakeToRun = true
objRootFolder.RegisterTaskDefinition objTask.Name, objDefinition, TASK_UPDATE or TASK_DONT_ADD_PRINCIPAL_ACE, , , objDefinition.Principal.LogonType
Set objTaskService = CreateObject("Schedule.Service")
objTaskService.Connect
Set objRootFolder = objTaskService.GetFolder("\")
Set objTask = objRootFolder.GetTask (TaskName)
Code: Select all
WakeEarlyMinutes=10 'change this to how many minutes earlier you want the computer to wake
ScheduledTask="WakeTA" 'change this change the name of the task that wakes the computer
Dim NextRecordingAt
CreateWakeTask
Monitor
function readFromRegistry (strRegistryKey)
Set WSHShell=CreateObject("WScript.Shell")
value=WSHShell.RegRead(strRegistryKey)
readFromRegistry=value
end function
Function ConvertToLocalDate(sTime)
od = CDate(Mid(sTime,9,2) & "-" & Mid(STime,6,2) & "-" & Mid(STime,1,4) & " " & Mid(STime,12,8))
Set oShell = CreateObject("WScript.Shell")
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias"
offsetMin = oShell.RegRead(atb)
offsetMin = -(offsetMin+WakeEarlyMinutes)
ad = dateadd("n", offsetMin, od)
sMonth = Month(CDate(ad))
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDay = Day(CDate(ad))
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
sHour = Hour(CDate(ad))
If Len(sHour) = 1 Then
sHour = "0" & sHour
End If
sMinute = Minute(CDate(ad))
If Len(sMinute) = 1 Then
sMinute = "0" & sMinute
End If
ConvertToLocalDate=(sMonth & "/" & sDay & "/" & Year(CDate(ad)))
End Function
Function ConvertToLocalTime(sTime)
od = CDate(Mid(sTime,9,2) & "-" & Mid(STime,6,2) & "-" & Mid(STime,1,4) & " " & Mid(STime,12,8))
Set oShell = CreateObject("WScript.Shell")
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias"
offsetMin = oShell.RegRead(atb)
offsetMin = -(offsetMin+WakeEarlyMinutes)
ad = dateadd("n", offsetMin, od)
sMonth = Month(CDate(ad))
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDay = Day(CDate(ad))
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
sHour = Hour(CDate(ad))
If Len(sHour) = 1 Then
sHour = "0" & sHour
End If
sMinute = Minute(CDate(ad))
If Len(sMinute) = 1 Then
sMinute = "0" & sMinute
End If
ConvertToLocalTime=(sHour & ":" & sMinute)
End Function
sub CreateWakeTask()
NextRecordingAt=readfromRegistry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording\NextRecordingAt")
NextRecordingDate=ConvertToLocalDate(NextRecordingAt)
NextRecordingTime=ConvertToLocalTime(NextRecordingAt)
Set Wshell = WScript.CreateObject("WScript.Shell")
Task=("SCHTASKS /CREATE /F /SC ONCE /TN """ & ScheduledTask & """ /TR ""START"" /SD " & NextRecordingDate & " /ST " & NextRecordingTime)
Wshell.run Task,0,true
Const TASK_UPDATE = &H4
Const TASK_DONT_ADD_PRINCIPAL_ACE = &H10
TaskName = ScheduledTask
Set objTaskService = CreateObject("Schedule.Service")
objTaskService.Connect
Set objRootFolder = objTaskService.GetFolder("\")
Set objTask = objRootFolder.GetTask ("\" & TaskName)
Set objDefinition = objTask.Definition
objDefinition.Settings.WakeToRun = true
objRootFolder.RegisterTaskDefinition objTask.Name, objDefinition, TASK_UPDATE or TASK_DONT_ADD_PRINCIPAL_ACE, , , objDefinition.Principal.LogonType
Set objTaskService = CreateObject("Schedule.Service")
objTaskService.Connect
Set objRootFolder = objTaskService.GetFolder("\")
Set objTask = objRootFolder.GetTask (TaskName)
end sub
sub monitor()
while(1)
Wscript.sleep(1000)
NextRecordingAtNew=readfromRegistry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording\NextRecordingAt")
if NextRecordingAtNew <> NextRecordingAt Then
CreateWakeTask
end if
wend
end sub
Code: Select all
I finally found the fix. Here are the steps:
1. Open the Start Menu, click on run, then type taskschd.msc in the run box and press Enter
2. In the left pane of Task Scheduler, double click on (to expand) Task Scheduler Library, then click Microsoft, then click Windows, then click on Media Center.
3. On the top menu bar, click on View and then click on Show Preview Pane and Show Hidden Tasks (to enable these features).
4. In the top half of the middle pane of Task Scheduler, use the middle pane scroll bar and scroll down to the phrase: StartRecording and click on it. This command is located at the 2nd to last choice at the bottom in the "Name" column, insure the "Name" column is wide enough to read all titles by dragging the column bar right .
5. On the bottom half of the middle pane that appears after clicking on StartRecording, click on the General tab.
6. Lastly at the bottom of that tab, click on the Configure for: pull down menu and select Windows 8.1.
My machine still listed Windows 7 in that data field even though I'm using Windows 8.1 from an upgrade off the Microsoft Store. The upgrade software doesn't change this setting, but it is needed for proper functioning of Windows Media Center when awakening the PC during sleep mode.
I tested the above and it fixed the problem on a scheduled recording for the first time since installing windows 8.1.
Thanks after 4 years i finally got my MCE machine to sleep and resume, thanks!
I assume one of my pr-release upgrades from Windows 7 didn't correctly set this.
Xbox360 is working with some additional steps. Presently, Ceton Echo is not working for me, all though there has been some progress. Haven't heard much from the guy working on Linksys DMA. Microsoft has removed a few WMC features in the version of WMC that is used (WMC for Win 8.1 version 6.3.9600.16384) for Win10...such as Always On Top (workaround available).andy_d wrote:Hey guys. Since you have been messing around with this already, is it possible to list out what you will lose by making this move to Windows 10?
It sounds like waking the PC from sleep to record should be resolved if the instructions are followed
What about DRM channels? Can you watch and record?