4106 error when creating scheduled task

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
Andrey
Posts: 47
Joined: Thu Jul 10, 2014 9:06 am

4106 error when creating scheduled task

Post by Andrey » Wed Mar 11, 2015 3:41 pm

Hi,

When installer creates scheduler task "4106 error" appears.
Please give me the clue what caused this problem? And how can I debug it?

Code: Select all

MSI (s) (34:DC) [16:20:35:973]: Executing op: CustomActionSchedule(Action=AI_ScheduleTasks,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (34:C8) [16:20:35:974]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI96F4.tmp, Entrypoint: ScheduleTasks
MSI (s) (34:44) [16:20:35:974]: Generating random cookie.
MSI (s) (34:44) [16:20:35:975]: Created Custom Action Server with PID 9484 (0x250C).
MSI (s) (34:3C) [16:20:36:004]: Running as a service.
MSI (s) (34:3C) [16:20:36:005]: Hello, I'm your 32bit Elevated custom action server.
AI_ScheduleTasks: <task name>: Updater LM
MSI (s) (34!CC) [16:20:36:037]: Transforming table Error.

Error 4106. An error was encountered while creating a scheduled task: "Updater LM.job". Error description: <the system cannot find specified path>.

MSI (s) (34!CC) [16:20:37:570]: Transforming table Error.
If I skip the error window, the installation finished succesfully. The task is created in Task Scheduler, but there is no job file in c:\windows\tasks folder.

[#gisget.exe] is installed to [APPDIR].
Here is the task settings dialog:

Please
Best regards,
Andrey
Attachments
Безымянный.png
Безымянный.png (33.48 KiB) Viewed 3856 times
a14b74bb22076d463b724de7dcda0ad2.png
a14b74bb22076d463b724de7dcda0ad2.png (20.66 KiB) Viewed 3860 times
Last edited by Andrey on Thu Mar 12, 2015 9:48 am, edited 1 time in total.

Andrey
Posts: 47
Joined: Thu Jul 10, 2014 9:06 am

Re: 4106 error when creating scheduled task

Post by Andrey » Wed Mar 11, 2015 5:11 pm

Where can I find the source code of the AI_ScheduleTasks custom action if its free to read?

best regards,
Andrey

Daniel
Posts: 7812
Joined: Mon Apr 02, 2012 1:11 pm
Contact:

Re: 4106 error when creating scheduled task

Post by Daniel » Thu Mar 12, 2015 4:36 pm

Hello Andrey,

The sources of our "AI_ScheduleTasks " custom action are not public. To have a better look over your installation scenario, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Andrey
Posts: 47
Joined: Thu Jul 10, 2014 9:06 am

Re: 4106 error when creating scheduled task

Post by Andrey » Fri Mar 13, 2015 11:37 am

Hi, Daniel,
I've managed to solve my problem. The reason was my custom action which manually deletes scheduled task on uninstall (regular uninstall and upgrade). This custom action was added because of issue in AI: http://www.advancedinstaller.com/forums ... =2&t=29388.

I've realized that its not necessary to delete scheduled task during "uninstall by upgrade". When I changed condition of my custom action to launch only "after regular uninstall" the problem had fixed.
__
Best regards,
Andrey.

Daniel
Posts: 7812
Joined: Mon Apr 02, 2012 1:11 pm
Contact:

Re: 4106 error when creating scheduled task

Post by Daniel » Fri Mar 13, 2015 12:12 pm

I'm glad you got everything working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

abarry
Posts: 3
Joined: Thu Dec 15, 2016 3:48 pm

Re: 4106 error when creating scheduled task

Post by abarry » Tue Jan 31, 2017 8:34 pm

Hi everyone,

I have just gotten past a 4106 error which occurred when the installer attempted to create scheduled tasks on Windows Server 2012 R2. In my case the error stated that "... A specified logon session does not exist. It may have already been terminated". The Advanced Installer team pointed me in the direction of a blog post from Microsoft's platform team (https://blogs.technet.microsoft.com/ask ... -not-exist), which contained the solution to the problem I was facing. Basically, the problem was a local security policy named Network access: Do not allow storage of passwords and credentials for network authentication which needs to be disabled, i.e.:
  • 1. Go to "local security policy" in Windows.
    2. Navigate to: "Local policies > security options > Network access: Do not allow storage of passwords and credentials for network authentication", and double-click the item.
    3. Choose "disabled".
    4. Click "OK".
    5. Run the installer again.

Eusebiu
Posts: 4623
Joined: Wed Nov 14, 2012 2:04 pm

Re: 4106 error when creating scheduled task

Post by Eusebiu » Wed Feb 01, 2017 8:46 am

Hi,

Thank you for sharing the solution with us, I'm sure it will help other users in the future.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Post Reply