Page 2 of 23

Re: Automatic Update of WSUS OU (svn)

PostPosted: 11.05.2010, 09:56
by Markus
Ups, ein Problem!
Durch die Aktualisierung vom Trunk wird auch jedesmal meine UpdateInstaller.ini überschrieben und es wird auch die Autorun.inf ins Client-Verzeichnis kopiert.
Beides möchte ich verhindern.
Gibt es dafür auch eine Option von Subversion?

Oops, there's a problem!
After updating with trunk my file UpdateInstaller.ini is overwritten and also the Autorun.inf is copied into the Client directory.
I want to avoid both.
Is there an option for subversion too?

Re: Automatic Update of WSUS OU (svn)

PostPosted: 11.05.2010, 14:56
by -Iwan-
Das Problem ist (oder auch nicht), das ein neuer Trunk per PrepareReleaseTree.cmd das vorhandene WSUS OU rigeros überschreibt.
Um die Autorun.inf nach dem Update automatisch zu löschen, könntest du einfach am Ende der WSUSOU-Update.cmd zwischen ":EOF" und "exit" eintragen:
del "%WSUSOU%\client\Autorun.inf"

Was stimmt denn mit der Standard-UpdateInstaller.ini nicht, das deine behalten möchtest?
Kopier deine aktuelle UpdateInstaller.ini in den WSUSOU-Update-Ordner und füge am Ende der WSUSOU-Update.cmd zwischen ":EOF" und "exit" ein:
xcopy UpdateInstaller.ini "%WSUSOU%\client\" /V /R /Y
Problem dabei könnte sein, das deine .INI nicht alle Parameter enthält, falls was neues hinzugekommt.

The problem is (or not), that a new trunk will overwrite the existing WSUS OU by using the PrepareReleaseTree.cmd.
To delete the Autorun.inf after the update, you could add the following line in the WSUSOU-Update.cmd at the end between ":EOF" and "exit":
del "%WSUSOU%\client\Autorun.inf"

What's wrong with the standard UpdateInstaller.ini, so that you have to change it?
Copy your actual UpdateInstaller.ini to the WSUSOU-Update folder and add the following line in the WSUSOU-Update.cmd at the end between ":EOF" and "exit":
xcopy UpdateInstaller.ini "%WSUSOU%\client\" /V /R /Y
If new parameters will be released, you maybe will not get them, which could be a problem.

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 00:56
by BrentNewland
Thanks, this is great!

Quick question, I want to completely automate the process of updating WSUS and then downloading the latest updates (create a scheduled task and do it twice a week).

UpdateGenerator.exe doesn't seem to have any command line switches for silent mode.

What command would I give it to start downloading updates automatically without a GUI prompt, unattended, using my UpppdateGenerator.ini preferences?

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 03:46
by boco
For batch mode, you don't use UpdateGenerator.exe, but .\cmd\DownloadUpdates.cmd .

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 07:02
by -Iwan-
Guten morgen,

du solltest eine Batchdatei mit den benötigten Parametern für die Downloads erstellen. Speicher die Datei direct in den wsusoffline Ordner.
Editiere dann meine WSUSOU-Update.cmd in Zeile 16: ersetze "UpdateGenerator.exe" mit dem Namen deiner Datei.

Good morning,

you should create a batch file with the needed parameters for the automatic download. This file should you save directly in the wsusoffline folder.
Then edit my WSUSOU-Update.cmd on line 16: change "UpdateGenerator.exe" with the name of your file.


Beispiel für so eine Batch / Example for such a file:
Code: Select all
cd /D cmd
call DownloadUpdates.cmd wxp deu
call DownloadUpdates.cmd w2k enu
call DownloadUpdates.cmd w60 glb


Ich werde versuchen, ein HowTo über die Parameter und wie man sie verwendet zu schreiben.
I will try to create a HowTo about the parameters and how to use them.

Für die Parameter /for the parameter -> click me softly

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 07:16
by Markus
Danke Iwan,
ich habs dann so gemacht und bin jetzt zufrieden. :)

Thanks Iwan,
I did it that (similiar) way and now I'm satisfied.


Code: Select all
:EOF
copy .\UpdateInstaller.ini %WSUSOU%\Client /y
del %WSUSOU%\Client\Autorun.inf
exit

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 08:29
by Markus
Markus wrote:Danke Iwan,
ich habs dann so gemacht und bin jetzt zufrieden. :)

Thanks Iwan,
I did it that (similiar) way and now I'm satisfied.


Code: Select all
:EOF
copy .\UpdateInstaller.ini %WSUSOU%\Client /y
del %WSUSOU%\Client\Autorun.inf
exit

Mist, so geht das doch nicht! Die beiden Zeilen werden einfach nicht ausgeführt. Ich hab sogar ein pause nach den Zeilen eingefügt doch auch das wird nicht ausgeführt.
Also musste ich die beiden Zeilen direkt vor dem Aufruf von WSUSOU einfügen.

Sh*t!
It doesn't work that way. These lines are not processed. I added a pause after these lines to see but no execution. :?:
So I had to add my 2 lines directly before starting WSUSOU:

Code: Select all
:WSUSOUStart
cls
echo.
echo WSUS OU is now on trunk %rRevision%
echo.
copy .\UpdateInstaller.ini %WSUSOU%\Client /y
del %WSUSOU%\Client\Autorun.inf
ping localhost >NUL
echo Starte WSUS OU... / Starting WSUS OU...

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 14:08
by Gerby
Hallo Markus, hallo Iwan!

Markus wrote:
Code: Select all
:EOF
copy .\UpdateInstaller.ini %WSUSOU%\Client /y
del %WSUSOU%\Client\Autorun.inf
exit

Das Problem ist die Sprungmarke :EOF. Diese ist seitens Windows bereits fest definiert für das tatsächliche Ende der Batchdatei. :!: Ergo: Einfach den Label und die Sprünge dorthin umbenennen.

The problem lies in the label :EOF. This is predefined by Windows as the actual end of the batch file. :!: Therefore, just rename the label and all references to it.

Grüße
Gerby

P.S.: Iwan, gibt's einen bestimmten Grund, warum Du bei den Goto-Aufrufen immer den Doppelpunkt for den Sprungmarkennamen setzt? Wird dadurch eventuell die Funktion des Sprungs irgendwie beeinflusst? Ich kenne es (mit der :EOF-Ausnahme) so, dass man beim Goto-Aufruf die Sprungmarke ohne Doppelpunkt benennt.

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 15:33
by -Iwan-
Das mit dem :EOF ist fest definiert? Dann werde ich das mal in v0.3 ändern und auch einen Bereich für Sonderanpassungen mit reinnehmen.
Die Doppelpunkte bei den goto-Aufrufen werden ignoriert und dienen mir nur zur Übersicht. Außerdem ist das Copy einer ganzen Zeile einfacher und so rutscht der Sprungpunkt dann halt mit dem Doppelpunkt hinters goto :geek:

Neue Version v0.3 online / new version v0.3 online: click me softly

Re: Automatic Update of WSUS OU (svn)

PostPosted: 12.05.2010, 16:10
by Gerby
-Iwan- wrote:Das mit dem :EOF ist fest definiert?

Info in der Windows-Hilfe oder online.