Change the path to wsusoffline.log file

Change the path to wsusoffline.log file

Postby arthur » 20.06.2014, 13:18

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 !!
arthur
 
Posts: 20
Joined: 23.12.2013, 09:19

Re: Change the path to wsusoffline.log file

Postby WSUSUpdateAdmin » 20.06.2014, 14:38

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
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Change the path to wsusoffline.log file

Postby arthur » 20.06.2014, 14:45

Thank you very well for this tip !!
arthur
 
Posts: 20
Joined: 23.12.2013, 09:19

Re: Change the path to wsusoffline.log file

Postby arthur » 20.06.2014, 14:59

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%
Last edited by arthur on 20.06.2014, 15:12, edited 1 time in total.
arthur
 
Posts: 20
Joined: 23.12.2013, 09:19

Re: Change the path to wsusoffline.log file

Postby WSUSUpdateAdmin » 20.06.2014, 15:12

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
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Change the path to wsusoffline.log file

Postby arthur » 20.06.2014, 15:17

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.
arthur
 
Posts: 20
Joined: 23.12.2013, 09:19

Re: Change the path to wsusoffline.log file

Postby WSUSUpdateAdmin » 20.06.2014, 15:24

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
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Change the path to wsusoffline.log file

Postby arthur » 20.06.2014, 15:39

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 ?
arthur
 
Posts: 20
Joined: 23.12.2013, 09:19

Re: Change the path to wsusoffline.log file

Postby WSUSUpdateAdmin » 20.06.2014, 17:12

Did you forget to rename .cmdt into .cmd?
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Change the path to wsusoffline.log file

Postby aker » 20.06.2014, 22:55

@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%.
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Next

Return to Installation / Updating

Who is online

Users browsing this forum: Google [Bot] and 37 guests

cron