Can't import tasks when fresh install Windows.

Page 1 of 2 12 LastLast

  1. Posts : 303
    Windows 10 x64 1809 LTSC
       #1

    Can't import tasks when fresh install Windows.


    I have an automation script that tries to import several tasks. These fail with an error;

    ERROR: No mapping between account names and security IDs was done.

    This is because the xml file for the task when it was exported has a userid field which contains the SID for that installation of Windows.

    <UserId>S-1-5-21-3173435481-3098723185-4139672091-1001</UserId>

    The SID changes with each Windows install, so it doesn't match. Hence the import fails.

    Does any one know a way around this?

    One thing I thought of ... It's easy enough to grab the SID from the registry, but I don't know how to replace the line in the XML file with the new SID
      My Computers


  2. Posts : 834
    Windows 10 Pro 64bit 21H2 19044.1806
       #2

    Wobitancrawfodi said:
    One thing I thought of ... It's easy enough to grab the SID from the registry, but I don't know how to replace the line in the XML file with the new SID
    Any text editor will work.

    I do this with every clean install.
      My Computers


  3. Posts : 303
    Windows 10 x64 1809 LTSC
    Thread Starter
       #3

    Farvatten said:
    Any text editor will work.
    I do this with every clean install.
    Lol. Of course. Gee, I really worded the OP badly, and managed to make myself look like a real noob in the process.

    The first 5 words of the original post.... "I have an automation script"

    I want to do it from a command line within that script.

    But that's only one idea. Perhaps there are other, better ways of resolving this issue?
      My Computers


  4. Posts : 834
    Windows 10 Pro 64bit 21H2 19044.1806
       #4

    Wobitancrawfodi said:
    The first 5 words of the original post.... "I have an automation script"


    Ahhh.. I see said the old blind man...

    That was all me actually. I misead your first line, mistakenly thinking the task to be imported did the automation work.

    Writing a vbscript or a more modern Powershell solution, something that can open, read and write to files might be two possible paths.
      My Computers


  5. Posts : 303
    Windows 10 x64 1809 LTSC
    Thread Starter
       #5

    I think I have a tendency to word things poorly because my scribbles are more often misunderstood than not.

    Power shell? Whoa. technology peaked with Batch programming :) I wouldn't know where to start.

    I did try replacing the SID with an actual PC-Name\User-name but that produced the same error.
      My Computers


  6. Posts : 834
    Windows 10 Pro 64bit 21H2 19044.1806
       #6

    Wobitancrawfodi said:
    I did try replacing the SID with an actual PC-Name\User-name but that produced the same error.
    Hmm, there might be something else going on here with that account.

    I was able to substitute <UserId>PC-Name\User-nameon</UserId> for the SID on mine AND when I purposely changed the SID to something invalid I got this error message instead of the one you got:


    Can't import tasks when fresh install Windows.-badsid-errormsg.jpg



    It's possible you have something with that particular account outside of Task Manager that's the actual problem.

    Googling your error message points in that direction:


    "The reason you are getting the "No mapping between account names and security IDs was done" is either because you now have an orphaned user account. This occurred when you deleted or renamed your old user name which was still in use by the system as each user name has a unique SID or it may be due to a corrupted user profile."

    What is meant by " No Mapping between account names and Security Id was done"

    You could easily create a new account and test it.
      My Computers


  7. Posts : 303
    Windows 10 x64 1809 LTSC
    Thread Starter
       #7

    Yep. The account is orphaned. The SID associated with the task no longer exists. That's the very definition of orphaned. But when I tried Tanya-PC\Tanya which is the actually PC name and user name for this PC, I thought it might work. In this case, I would not have thought that to be an orphaned account.

    Thanks for that link. I had already read it and tried that stuff before I posted here. I'm a bit skeptical about the "Corrupted" user profile. This is a brand new Windows install. The user account has been freshly created, but I followed the steps anyway.

    Yes, if I use a bogus username and PC name I get the same error you get.

    I only use local accounts. There are no Microsoft accounts.
      My Computers


  8. Posts : 11,640
    Windows 10 Home x64 Version 21H2 Build 19044.1776
       #8

    You can just delete the user ID line <UserId>...</UserId> from the xml completely and it will import for the currently logged in user.

    Denis
      My Computer


  9. Posts : 303
    Windows 10 x64 1809 LTSC
    Thread Starter
       #9

    Try3 said:
    You can just delete the user ID line <UserId>...</UserId> from the xml completely and it will import for the currently logged in user.
    Good idea. I'll give it a try.
      My Computers


  10. Posts : 11,640
    Windows 10 Home x64 Version 21H2 Build 19044.1776
       #10

    I've used it before and it works.

    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:20.
Find Us




Windows 10 Forums