Page 1 of 1

Running Update.cmd from a Network Drive

PostPosted: 23.10.2018, 14:23
by s3dbw
Could someone perhaps give me some help/guidance? I am trying to deploy the updates to a number of client machines from a server. I should add that this is a completely standalone system not connected to the internet. In otherwords I periodically transfer the update file (taken from an internet enabled system) and copy across to the standalone server. I was then planning on using the task scheduler on the client machines to run the update.cmd file on a periodic basis. However windows 10 advises that CMD files cannot be run from \\UNC drives. Is there a way to get around this, or a an alternative means of deploying across several client machines from a single server source.?

Thanks in advance

Re: Running Update.cmd from a Network Drive

PostPosted: 23.10.2018, 15:05
by Dalai
It's just a warning that the working directory has been reset to %SystemRoot%\system32 when calling a batch script or CMD from a UNC path. WSUS Offline should run normally anyway.

If it does not, it's possible to adapt it and it's rather simple. Change Update.cmd to look like this:
Code: Select all
@echo off
pushd "%~dp0cmd"
call DoUpdate.cmd %*
popd
This maps a network drive automatically (pushd does this) and calls the script afterwards. Note that you should make a backup of Update.cmd before editing it. It's also possible to do it without a mapped network drive, like so:
Code: Select all
@echo off
cd /D "%~dp0cmd"
start %~dp0cmd\DoUpdate.cmd %*
(the warning about the UNC path can then be ignored).

Regards
Dalai

Re: Running Update.cmd from a Network Drive

PostPosted: 23.10.2018, 15:46
by s3dbw
Many thanks, will give this a go tomorrow when I get back on the system and let you know how I get on.

Thanks again for the help

Re: Running Update.cmd from a Network Drive

PostPosted: 24.10.2018, 08:12
by s3dbw
That first bit of script worked like a charm, once again many thanks for the help

regards