Page 1 of 1

Update

PostPosted: 08.04.2015, 17:18
by paluas
Hello,

(before explain my problem i apologize for my english, i'm italian and i study english only at school)

I'm developing an automatic update for the preparation of the pc in my shop.

Before using this system I spent whole days to use windows update.

to install and configure the machines use a .bat file I created, I wanted to add the update with this wonderful program at the end of the file by calling the .bat file DoUpdate or Update.

I can not recall the command with the restart function that offers this program, I can install just about 120 Update.
if I launch the program via /client/ updateinstaller.exe I makes many more updates with reboots and full installations.
Who can help with debugging of my script?
Thank you for your help

Thomas

Re: Update

PostPosted: 08.04.2015, 18:20
by aker

Re: Update

PostPosted: 09.04.2015, 12:53
by paluas
I used the comand, but when pc reboot the installation of update stop... How can i Made to restart the update progres after reboot??

Thanks

Re: Update

PostPosted: 09.04.2015, 13:47
by aker
Did you use "/autoreboot"?
Please post the content of C:\Windows\wsusofflineupdate.log in [code]-tags.

Re: Update

PostPosted: 09.04.2015, 13:53
by paluas
My command script is this:

C:\post\w764\client\cmd\doupdate.cmd /updatercerts /instielatest /updatecpp /instmssl /instdotnet35 /instdotnet35 /verify /autoreboot

the directory of wsusoffline is C:\post\w764

computer reboot but don't restart the install of updates

Re: Update

PostPosted: 09.04.2015, 16:04
by aker
Please take a look at the second part of my post.

aker wrote:Please post the content of C:\Windows\wsusofflineupdate.log in [code]-tags.

Re: Update

PostPosted: 10.04.2015, 08:15
by paluas
I resolved With a Magic Number.. :lol: :lol: :lol: :lol:
I put the script I wrote before the start of scripts of DoUpdate.cmd....
with a test in a log file I test if the programs are just install or not

Now, when the pc restarts after the installation of my programs and updates,the pc remains in WOUTempAdmin Account without make nothing.

I search my new type of problem but i don't find nothing..

Wsusoffline is on a shared public folder in my server and I start installation from it

Who can help me?

Thomas

Re: Update

PostPosted: 10.04.2015, 14:53
by aker
Did you mount it as network drive?
Is it possible tomaccess the network share without a password?

Re: Update

PostPosted: 10.04.2015, 16:44
by paluas
I Found the directory with the \\192.68.x.x in my network and with a test i found if I put original DoUpdate.cmd into the right position, the script restarts correctly.

I see with this test if I launch the original program the script run correctly, but when i put my modification into DoUpdate.cmd the script crash at reboot with WoUserTemp user.

I share my customization of file and please take a look if you found an error...

Code: Select all
@echo off

:AMICIDELPC
if exist c:\post\mos.log goto pcfatto
echo Procedura "Program" eseguita il %DATE% %time% >>c:\post\mos.log
echo. >>c:\post\mos.log
echo. >>c:\post\mos.log
robocopy "\\KASEYALAB\Lab_Rip\post" "C:\post" /MIR

:1
echo Disattivazione Windows Update eUAC
@echo Disattivazione Windows Update >>c:\post\mos.log
@echo. >>c:\post\mos.log
net stop "windows update"
net stop wuauserv
sc config "wuauserv" start= disabled
echo FATTO!
goto 2

:2
echo.
echo Installazione WinRar...
if exist "c:\program files (x86)" (start "" /wait "C:\post\ZIP\WinRAR_501it.exe" /s) ELSE (start "" /wait "C:\post\ZIP\WinRAR 3.80 ita.exe" /s)
@echo INSTALLATO WINRAR >>c:\post\mos.log
@echo. >>c:\post\mos.log
echo FATTO!

...



:ENDING
echo.
echo Forzatura Home Page Internet Explorer
@reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t "reg_sz" /d "http://www.google.it" /f
@echo FORZATA HOME PAGE IE >>c:\post\mos.log
@echo. >>c:\post\mos.log
echo FATTO!
echo.
echo Disattivazione Action Center Service and Icon
sc config wscsvc start= disabled
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v HideSCAHealth /t REG_DWORD /d 0x1
echo FATTO!
echo.
echo Disabilitazione Action Center
@sc config wscsvc start= disabled
@reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v HideSCAHealth /t REG_DWORD /d 0x1 /f
@echo DISATTIVATO ACTION CENTER >>c:\post\mos.log
@echo. >>c:\post\mos.log
echo.
echo FATTO!
echo.

:Update
echo Riattivazione Windows Update
sc config "wuauserv" start= auto
net start "windows update"
net start wuauserv
@echo RIATTIVATO WINDOWS UPDATE >>c:\post\mos.log
@echo. >>c:\post\mos.log
echo FATTO!
goto aggiornamento

:pc fatto

echo.
echo.
echo Nel pc Ë già stata lanciata questa procedura.
@type c:\post\mos.log
goto aggiornamento

:aggiornamento
rem *** Author: T. Wittrock, Kiel ***

verify other 2>nul
setlocal enableextensions
if errorlevel 1 goto NoExtensions

if "%DIRCMD%" NEQ "" set DIRCMD=

...


I don't Understand where I make the mistake...

Re: Update

PostPosted: 10.04.2015, 22:13
by aker
Please try using .\client\cmd\custom\InitializationHook.cmd for custom initialization actions instead of modifying DoUpdate.cmd. Then it will print an errorlevel, if something fails.