Page 2 of 2

Re: DoUpdate.cmd error

PostPosted: 31.10.2017, 23:42
by Dalai
aker wrote:I'm a little confused, as the cmd always changes to VirtualBox's install path.

Yes, that confused me, too.

Please open regedit and check if one of those keys exist. If yes, please post its content:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor->AutoRun
HKEY_CURRENT_USER\Software\Microsoft\Command Processor->AutoRun

Interesting. Didn't know about those.

ElAlamein wrote:Can do it any problems ?

Yes, apparently. Rename the AutoRun value (or delete it) and then you should be able to use WSUS Offline.

Just to elaborate why your registry modification results in this issue. CMD always runs the command(s) in the AutoRun value when started. Since (one of) these commands changes the path and drive to your VirtualBox directory, WSUS Offline's Update.cmd script can't find DoUpdate.cmd, because it expects it in the current (working) directory.

---

However, there's room for improvement in Update.cmd. Changing the last line to
Code: Select all
start "" "%~dp0cmd\DoUpdate.cmd" %*
would resolve this specific issue as well. But it's unclear whether or not subsequent commands (in DoUpdate.cmd) could result in similar errors because the working directory is still wrong. Maybe change to the working directory in DoUpdate.cmd with something like this
Code: Select all
cd /D "%~dp0"
(or pushd) as one of the first commands, just to be sure?

Regards
Dalai

Re: DoUpdate.cmd error

PostPosted: 01.11.2017, 13:06
by ElAlamein
Hi , I have deleted the key Autorun , and now when I open cmd runas administrators , it shows C:\Windows\system32.
When I launch "UpdateInstaller.exe" , the prompt shows :

Code: Select all
Starting WSUS Offline Update (v. 11.0.3) at HH.MM.SS,32...
Checking user's privileges...
Determining system's properties...

ERROR: Unsupported Operating System ( x64).

Ending WSUS Offline Update at HH.MM.SS,61...

C:\Users\myprofile\Downloads\wsusoffline1103\wsusoffline\client\cmd>
(I have written "myprofile")

When I launched "UpdateGenerator.exe" , I have selected "Windows 8.1 x64".
Kind Reguards

Re: DoUpdate.cmd error

PostPosted: 01.11.2017, 15:02
by Dalai
Did you modify/"tweak" something else in your system, like disabling Windows Scripting Host (WSH)? If so, you need to enable it to be able to use WSUS Offline.

Regards
Dalai

Re: DoUpdate.cmd error

PostPosted: 01.11.2017, 17:57
by ElAlamein
Hi , Dalai , I have not edited WSH key in registry before.

Re: DoUpdate.cmd error

PostPosted: 02.11.2017, 00:30
by aker
Please check, if WMI is working properly by trying the following:
Double-click .\client\cmd\DetermineSystemsProperties.vbs and post the content of WOUSystemProperties.txt (stored on your desktop) here. If there is an error message, please post a screenshot of it here.
Also open an administrative command promot and post the result of this command:
Code: Select all
sc query winmgmt


You asked for the code-tags. Directly above the box, where you type the post, there is a button named "Code", click it and post the text, you want to post in code-tags between the "code" and "/code"-element.

@Dalai
Both (Update.cmd and DoUpdate.cmd) already perform "cd /d %~dp0", so there has to be something else, we should do.

@WSUSUpdateAdmin
Could we make the AutoIt-scripts add the full path to Update.cmd/DownloadUpdates.cmd and then check %0 against %cd% or %~dp0?

Re: DoUpdate.cmd error

PostPosted: 02.11.2017, 15:39
by Dalai
aker wrote:Both (Update.cmd and DoUpdate.cmd) already perform "cd /d %~dp0" [...]

You're right. Should've taken a look at DoUpdate.cmd before posting :oops:. Still, using %~dp0cmd\DoUpdate.cmd in Update.cmd would make the path absolute which is less likely to fail. That is, unless someone "tweaked" their system to the limit...

Regards
Dalai

Re: DoUpdate.cmd error

PostPosted: 03.11.2017, 22:32
by ElAlamein
Hi , Thanks a lot for yours help , the problem was winmgmt services : it was stopped and disabled.
I have enabled it and started and now Wsus offline works well.
Thank you very much.
Kind Reguards.

Re: DoUpdate.cmd error

PostPosted: 04.11.2017, 00:06
by aker
Nice to hear, that we were able to help you.