DoUpdate.cmd error

Re: DoUpdate.cmd error

Postby Dalai » 31.10.2017, 23:42

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
Dalai
 
Posts: 385
Joined: 12.07.2016, 21:00

Re: DoUpdate.cmd error

Postby ElAlamein » 01.11.2017, 13:06

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
ElAlamein
 
Posts: 8
Joined: 29.10.2017, 18:18

Re: DoUpdate.cmd error

Postby Dalai » 01.11.2017, 15:02

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
Dalai
 
Posts: 385
Joined: 12.07.2016, 21:00

Re: DoUpdate.cmd error

Postby ElAlamein » 01.11.2017, 17:57

Hi , Dalai , I have not edited WSH key in registry before.
ElAlamein
 
Posts: 8
Joined: 29.10.2017, 18:18

Re: DoUpdate.cmd error

Postby aker » 02.11.2017, 00:30

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?
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to sell it.
aker
aker
 
Posts: 2798
Joined: 02.03.2011, 15:32

Re: DoUpdate.cmd error

Postby Dalai » 02.11.2017, 15:39

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
Dalai
 
Posts: 385
Joined: 12.07.2016, 21:00

Re: DoUpdate.cmd error

Postby ElAlamein » 03.11.2017, 22:32

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.
ElAlamein
 
Posts: 8
Joined: 29.10.2017, 18:18

Re: DoUpdate.cmd error

Postby aker » 04.11.2017, 00:06

Nice to hear, that we were able to help you.
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to sell it.
aker
aker
 
Posts: 2798
Joined: 02.03.2011, 15:32

Previous

Return to Installation / Updating

Who is online

Users browsing this forum: No registered users and 5 guests