Getting COMExcpetion when attempting to register changes in a Windows 8.1 PC

Topics: Errors
Nov 11, 2013 at 2:22 PM
Edited Nov 11, 2013 at 2:23 PM
I've create a task using this library, that worked.

Now when I use the TaskEdit dialog in the following way:
Using D As New TaskEditDialog()
    Using Tsk As Task = ts.GetTask("\MyTasks\Task1")
        D.Editable = True
        D.RegisterTaskOnAccept = True
        D.Initialize(Tsk)
    End Using
End Using
I get a COMException with __error code -2147216615 __and a message of (45,8):Period:. I have noticed that if I change the Configure For dropdown to Windows 7, Windows Server 2008 R2 it saves.

What am I doing wrong or does this library not support Windows 8.1 as yet?
Coordinator
Nov 12, 2013 at 4:16 PM
I'm not sure what is causing your error. I would change your code sample to:
Using D as New TaskEditDialog(ts.GetTask("\MyTasks\Task1"), True, True)
   D.ShowDialog()
End Using
Let me know if that changes anything. I had tested this on 8.1. If you are seeing the error still, please post the result of the D.Task.Xml after calling the constructor (or Initialize) but before calling ShowDialog.
Nov 12, 2013 at 5:52 PM
Hi thanks for the suggestion but unfortunately it didn't work. The output from D.Task.xml is:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
        <Source>MyApp</Source>
        <Author>Me</Author>
        <Description>Collect Totals</Description>
    </RegistrationInfo>
    <Triggers>
        <CalendarTrigger>
            <StartBoundary>2013-11-12T18:00:00</StartBoundary>
            <Enabled>true</Enabled>
            <ScheduleByDay>
                <DaysInterval>1</DaysInterval>
            </ScheduleByDay>
        </CalendarTrigger>
    </Triggers>
    <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>true</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
            <Duration>PT10M</Duration>
            <WaitTimeout>PT1H</WaitTimeout>
            <StopOnIdleEnd>true</StopOnIdleEnd>
            <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>true</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>true</WakeToRun>
        <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
        <Priority>7</Priority>
        <RestartOnFailure>
            <Interval>PT1M</Interval>
            <Count>3</Count>
        </RestartOnFailure>
    </Settings>
    <Actions Context="Author">
        <Exec>
            <Command>C:\Users\darm\Documents\Visual Studio 2010\Projects\MyApp\Deliverable\Application\Task Runner.exe</Command>
            <Arguments>action=1</Arguments>
        </Exec>
    </Actions>
    <Principals>
        <Principal id="Author">
            <UserId>DG750\darm</UserId>
            <LogonType>InteractiveToken</LogonType>
            <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
    </Principals>
</Task>
Nov 19, 2013 at 8:20 AM
Hi is there any news on this issue?
Jan 5, 2014 at 10:11 AM
I've also encountered this issue! I'm using C# and am getting the exact same exception for TaskEditDialog. When I change the dropdown to Windows 7, Windows Server 2008 R2, task saves fine.
This error appears when using the example code snippet for TaskEditDialog on the website.
I'd be very interested to know of any updates.
Coordinator
Jan 7, 2014 at 3:53 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.