Page 1 of 2

Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 13:18
by arthur
Hello guys !!

Again , i post a little question :

Is there a way to change the location of the wsusoffline.log file ?

Actually is stored in %SystemRoot%\ , and i want it to be stored in a network share.

I use the wsusoffline program in my environnement with 30 PC , who run the DoUpdate.cmd script with all options espacially /autoreboot ( not /shutdown )

I can see that many scripts set the varaible "UPDATE_LOGFILE=%SystemRoot%\wsusoffline.log" like DoUpdate.cmd , or PrepareRecall.cmd and InstallOSUpdate.cmd for example.

My question is wich scripts do i must modify to make this possible ? And , can i actuallymake this repport log be writing in a network share ? Off course , this share have the good rights for writing in , making this action possible for the PC. ( ACL autorisation writing and modify to Anyone ! ) :D

Thank you guys !!

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 14:38
by WSUSUpdateAdmin
Hi.

Please
  • in ...\client\cmd\custom
  • rename InitializationHook.cmdt to InitializationHook.cmd
  • edit InitializationHook.cmd
  • insert
    Code: Select all
    @set UPDATE_LOGFILE=<your log file>
This will overwrite the default (%SystemRoot%\wsusofflineupdate.log).

Regards
T. Wittrock

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 14:45
by arthur
Thank you very well for this tip !!

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 14:59
by arthur
i try with this code
Code: Select all
@set UPDATE_LOGFILE=W:\wsusoffline\log\test.log

It looks like that it doesnt work , the wsusoffline.log file still be writing in %SystemRoot%\wsusoffline.log
The W:\ is the network drive that map to wsusoffline share folder.
Is the path to the log file must be in the local PC ?

I also try with this code
Code: Select all
@set UPDATE_LOGFILE=%SystemRoot%\test.log

And the problem was the same , no file call "test" in %systemRoot%

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 15:12
by WSUSUpdateAdmin
Hi.

This may be caused by the UAC.

Pls. try
Code: Select all
@echo off
net use W: \\<server>\<share>
set UPDATE_LOGFILE=W:\wsusoffline\log\test.log


Maybe
Code: Select all
@set UPDATE_LOGFILE=\\<server>\<share>\wsusoffline\log\test.log

will work as well.

RTW

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 15:17
by arthur
Thanks
I try this code with UAC disabled
Code: Select all
@echo off
net use W: \\<server>\wsusoffline
set UPDATE_LOGFILE=W:\wsusoffline\log\test.log

, another try with this code :
Code: Select all
@set UPDATE_LOGFILE=\\server\wsusoffline\log\test.log


I manually disable the UAC into the control panel , looks like doing the same problem.

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 15:24
by WSUSUpdateAdmin
You don't need to disable the UAC.
You just have to (re-)map drive W: in InitializationHook.cmd, because if you map it before calling UpdateInstaller.exe or DoUpdate.cmd, it'll be unavailable in the privileged context which UpdateInstaller.exe/DoUpdate.cmd require / ask for.
RTW

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 15:39
by arthur
Sorry i don't understand what you mean :

first step :

I call offlineupdate.cmd , this is the code for this script :

Code: Select all
net use W: \\10.143.7.253\wpkg\softwares\wsusoffline
W:
cd \client\cmd
call DoUpdate.cmd /instielatest /updatercerts /updatecpp /instmssl /instdotnet35 /instdotnet4 /instmsse /verify /autoreboot
exit

So the network drive is map before executing the DoUpdate.cmd script.

I (re)map this drive into the InitializationHook.cmdt like this
Code: Select all
@echo off
net use W: \\<server>\wsusoffline
set UPDATE_LOGFILE=W:\wsusoffline\log\test.log


But the logfile still be writing in %SystemRoot%\wsusoffline.log

If i juste try in the InitializationHook.cmdt to make a little change like this
Code: Select all
@set UPDATE_LOGFILE=%SystemRoot%\test.log


It dosent work it too.

So i don't think the problem was the W: drive network mapping... No ?

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 17:12
by WSUSUpdateAdmin
Did you forget to rename .cmdt into .cmd?

Re: Change the path to wsusoffline.log file

PostPosted: 20.06.2014, 22:55
by aker
@WSUSUpdateAdmin
Tried to do something similar with %temp% at download. It did not work.
In InitializationHook.cmd
Code: Select all
echo %temp%
returned my new path, back in DownloadUpdates.cmd the value changed back to the original one. I wasn't able to change the content of %temp%.