ERROR_INVALID_PASSWORD: Network password not correct. [WNetAddConnection2]

Get help for specific problems
Posts: 2
Joined: 10 Jan 2024

Flx

Hi,
I've a problem while synching in a network.
There are 12 computers, all synching to a NAS.
The job is launched by a batch run from task scheduler.
The batch autenthicates to the NAS,
it checks if a particular file on the NAS exist
and, if it finds the file, it runs a FreeFileSync batch job to synch the PC folder to the relative NAS folder.

Every now and then, usually every 4/5 days at least 2 or 3 computers gave the problem
Cannot connect to \\192.168.xxx.xxx\folder
ERROR_INVALID_PASSWORD: Network password not correct. [WNetAddConnection2]

I do nothing, I just let it be and wait for the next day,
the problem last 1, maximum 2 days and then it works as expected,
till the next time.

If I run the job directly from the interface I never got the problem.

I could let it be this way,
but the time I need the data, and they're not the last version,
it wouldn't be this great.

I've seen the this is a problem known since years
and it is surely given to some crazy thing inside the function.
Has anyone solved the thing in some way ?
Or, at the code level, it is not possible to use another function ?

Thanks
Posts: 2
Joined: 10 Jan 2024

Flx

Hi therube,
yes, it is the same problem.
I already run it as they say.
The task run by the scheduler is a batch,
the batch before autenthicates to the NAS (netuse)
and then launch the FreeFileSync batch job.
Also, before to launch the FreeFileSync job it check if a particular file on the NAS exists,
so the connection is checked before to run it.