Running Update.cmd from a Network Drive

Running Update.cmd from a Network Drive

Postby s3dbw » 23.10.2018, 15:23

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
s3dbw
 
Posts: 8
Joined: 13.09.2017, 09:04

Re: Running Update.cmd from a Network Drive

Postby Dalai » 23.10.2018, 16:05

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
Dalai
 
Posts: 633
Joined: 12.07.2016, 22:00

Re: Running Update.cmd from a Network Drive

Postby s3dbw » 23.10.2018, 16:46

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
s3dbw
 
Posts: 8
Joined: 13.09.2017, 09:04

Re: Running Update.cmd from a Network Drive

Postby s3dbw » 24.10.2018, 09:12

That first bit of script worked like a charm, once again many thanks for the help

regards
s3dbw
 
Posts: 8
Joined: 13.09.2017, 09:04


Return to Installation / Updating

Who is online

Users browsing this forum: No registered users and 19 guests