We have a Buffalo NAS drive as a backup drive.
And when we map this drive as B:\ , our backup application seems to understand this and run as an application.
But when run as a service, it does not recognize the mapping and crashes.
I tried giving the path as \\\192.168.x.x\Backups\ as the backup path, the service runs but then a lot of submodules fail because it sees the \\\ as a escape character.
What is the workaround so that the windows service can see the mapped drive.
I am trying to run zip.exe via a CreateProcess();
""C:\Users\jvenkatraj\Documents\SQLite\Debug\zip.exe" -9 -q -g -u "\\\192.168.123.60\Backup\store\location1\50\f2\25\43\d8\88\b9\68\49\8d\2b\d0\08\9e\7e\df\z.zip" "\\\192.168.123.60\Backup\store\temp\SPD405.tmp\file_contents""
The backslashes are messing with the quotes. And it is a WCHAR type, and I can’t change it to any other type, else I will have to redefine this elsewhere as well. How many backslashes should I use?
You can map a network drive inside the service itself using the WNetAddConnection2 API function.