New
#1
Batch file on network drive only works on some machines
Hello.
I am having a very strange problem I have not been able to solve. I have a Windows 10/11 network with a mix of desktop and laptop machines. All of the machines are connected to a Synology NAS sever which is where the network data is stored.
From this network some of the machines are Apache web servers, some are FTP servers, and some are support processors. Ther are a total of 8 machines.
All of the machines map the SYSTEM account to the network drive Z; at startup with a Windows Task batch file with one command: net use z: \\networkdrive\web /user:username password /persistent:yes
This works and is necessary to allow Apache server to find the root directory and log files on network drive Z: All the Apache services work fine so I know the map is fine.
What doesn't work is my AWSTats report batch file. It works fine on 3 of the 8 machines, two of which are Windows 10. The batch file is run from network drive Z: The AWStats command line is:
c:\perl64\bin\perl z:/awstats/tools/awstats_buildstaticpages.pl -awstatsprog=z:/awstats/wwwroot/cgi-bin/awstats.pl -update -config=configname -dir=z:/awstats/wwwroot/reports
which is being called from a recurring Windows task from network drive Z:
Perl is on the local C: drives of each machine but there is no AWStats data on the local drives. It's all on the network drive along with the Apache logs.
This command line fails on 5 of the 8 machines with a syntax error, but AWStats is not telling me what the error is. There is no single common denominator that I can find among all 8 machines. Some are laptops, some are desktops, some are Windows 10, some are Windows 11.
All of the machines have the exact same PATH and PATHEXT with the relevant C: and Z: directories in the path. All of the machines login with the same username. The web directories have EVERYONE permission.
I've tried moving all the data (web logs and AWStats configs) to the local C: drive and that didn't fix it.
What would cause the exact same batch file called from a network drive to run fine on some machines and fail on others? What else can I look at?
Thanks
Last edited by Leora; 23 Jun 2023 at 14:54.