Network Share Support

Network Share Support

Postby eangulus » 29.01.2011, 07:48

I was wondering why WSUS OU does not support unmapped UNC, and why there are so many issues regarding running from a Network Share.

Is this a technical limitation or just the way the program was written? If it is just the program files them maybe it needs to have a major rewrite.

If this could run from network shares and that means fully as in Downloading updates and the client side, I think allot of users would be very happy.

I have had it run from a Server Share previously but I have now lost the files and lost the page I got the instructions from. Basically it was a batch script that loaded on boot on my clients that auto mapped, ran a command line script to install the updates and then unmapped the drive once done. I also had the Update downloads on a Task Scheduler in Windows Server.

If someone can guide me on that it would be very helpful. I think I just needed the parameters for the doupdate script or something.
eangulus
 

Re: Network Share Support

Postby WSUSUpdateAdmin » 30.01.2011, 20:25

Hi and welcome, eangulus,

eangulus wrote:I was wondering why WSUS OU does not support unmapped UNC, and why there are so many issues regarding running from a Network Share. Is this a technical limitation or just the way the program was written? If it is just the program files them maybe it needs to have a major rewrite.

It's indeed a technical limitation, because cmd.exe does not support UNC names as the current directory (see http://support.microsoft.com/kb/156276).
To ensure most flexibility, all paths in the WOU scripts are given relatively or using environment variables, so I had to change the current directory to a known one inside the WOU structure.

eangulus wrote:If this could run from network shares and that means fully as in Downloading updates and the client side, I think allot of users would be very happy.

But you can do that already!
All you have to do is to map your UNC path to a drive letter, which UpdateInstaller.exe does automatically.

eangulus wrote:I have had it run from a Server Share previously but I have now lost the files and lost the page I got the instructions from. Basically it was a batch script that loaded on boot on my clients that auto mapped, ran a command line script to install the updates and then unmapped the drive once done. I also had the Update downloads on a Task Scheduler in Windows Server.

If someone can guide me on that it would be very helpful. I think I just needed the parameters for the doupdate script or something.

Code: Select all
net use <DriveLetter>: <UNCPath>
pushd <DriveLetter>:\cmd
call DoUpdate.cmd {parameters}
popd
net use <DriveLetter>: /delete


, where {parameters} are of:
/nobackup /verify /instie7 /instie8 /instie9 /updatewmp /updatetsc /instdotnet35 /instdotnet4 /instmsse /instwd /instpsh /instofccnvs
/autoreboot /shutdown /showlog /all /excludestatics (see DoUpdate.cmd).

Regards
Torsten Wittrock
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Network Share Support

Postby timmeR » 06.04.2011, 12:13

Hi Torsten,

I am trying to run WOU as an Enteo NetInstall project.

The NetInstall Installer calls my custom script copied from your snippet above:

Code: Select all
net use I: \\server\netinst$\Projects\{3232669F-09F7-4E2E-82F5-A103AA72A9CB}\Extern$ /persistent:yes
pushd I:\cmd
call DoUpdate.cmd /nobackup /instie8 /updatewmp /updatetsc /instdotnet35 /autoreboot /showlog
popd
net use I: /delete


The Problem now is after the first automatic reboot the WOUtempAdmin cant call the "I:\cmd\DoUpdate.cmd" because it doesnt know about drive letter "I:".

Is there an "official" WOU workaround or do I need to customize some stuff myself?

Thanks for your help,

Tim
timmeR
 

Re: Network Share Support

Postby WSUSUpdateAdmin » 06.04.2011, 14:36

Hi Tim,

timmeR wrote:The Problem now is after the first automatic reboot the WOUtempAdmin cant call the "I:\cmd\DoUpdate.cmd" because it doesnt know about drive letter "I:".

Is there an "official" WOU workaround or do I need to customize some stuff myself?


This perfectly matches the FAQ entry:

Code: Select all
Q: Can I start update installation from a shared network resource?
A: Yes, if the resource in question has been assigned a drive letter ("Map network drive" feature or "net use" command). Direct calls using UNC paths won't work, as they are not supported by command line scripts. Also you can't use the "Automatic reboot and recall" feature, as the shared resources may not be available for the temporary user account "WSUSUpdateAdmin".
Please note that installing patches over the network is against the philosophy of an Offline update, and the machine may be vulnerable to attacks while the update process is still in progress.


The GUI doesn't allow /autoreboot when started from a mapped network drive because it normally won't be accessible for the WOUTempAdmin.
Therefore, when you call DoUpdate.cmd directly, you just must not use /autoreboot.

Regards
Torsten Wittrock
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Network Share Support

Postby aker » 06.04.2011, 14:38

You have to customize it yourself.
I would try to use
Code: Select all
if "%RECALL_REQUIRED%"=="0" net use I: /delete

instead of
Code: Select all
net use I: /delete

This would keep the network drive, if the program needs to restart your computer.

@WSUSUpdateAdmin
Ich würde eine Regelung mit dem Netzwerk Laufwerk befürworten.
Im Temp Ordner des WSUOUAdmin eine Datei mit dem %cd% (aktuelles Verzeichnis) anlegen, damit dieser das dann unmounted.
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

Re: Network Share Support

Postby WSUSUpdateAdmin » 06.04.2011, 15:20

Das Netzlaufwerk ist nach einem Neustart nicht mehr da, persistent hin oder her, weil ein neuer Benutzer angemeldet wird.
Es automatisch im Kontext des neuen Benutzers zu verbinden, funktioniert i.d.R. auch nicht, es sei denn, es erlaubt anonymen Zugriff (z.B. Samba).

GTW
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: Network Share Support

Postby EricJanHteA » 08.04.2011, 17:23

Look what I have found. Could this be of any assistance.
TCC started from the desktop via a .lnk to it. It opens up a console window with square bracketed current dirs.
|
V
    [C:\Windows]\\laptop-ej\users

    [\\laptop-ej\users]"C:\Program Files\JPSoft\TCCLE12\tcc.exe" dir .

    TCC LE 12,10,60 Windows Vista [Version 6,0,6002]
    Copyright 2011 Rex Conn & JP Software Inc. All Rights Reserved


    Directory of \\laptop-ej\users\*

    17-03-2011 14:06 <DIR> .
    17-03-2011 14:06 <DIR> ..
    15-03-2011 3:32 <DIR> Acronis Agent User
    7-02-2011 7:54 <DIR> Administrator
    6-04-2011 23:44 <DIR> Beheerder
    17-03-2011 14:07 <DIR> Isala
    3-02-2011 16:52 <DIR> Public
    0 bytes in 0 files and 7 dirs
    22.274.236.416 bytes free

    [\\laptop-ej\users]c:

    [C:\Windows]


Beware! The dir . is running nested in a second TCC. So in the long end you have to "exit" it.

This is absolutely not possible with the cmd-shell of Windows. But with TCC it is and it is capable of much more than this. Run it by itself and type ?. I am just beginning to explore the numerous possibilities of it. A comprehensive manual is available at http://jpsoft.com/downloads/v12/TakeCommand.pdf. But it is too much for me to digest at this moment. But a quick glance gave me the assurance "goodbye cmd.exe"

Instead of calls to "cmd /c whatever" you have to use TCC. When TCC is not started from within a cmd-shell it presents itself with a console window with the current directory enclosed in square brackets.

This is the free version and you can get it here http://jpsoft.com/downloads/v12/tccle.exe. I am convinced that a good project as WSUS-offline can get all the goodies of these clever guys for nothing to make your project even better.

I did some fiddling. And it is best to leave cmd.exe out of the equation. Strange things happen when TCC is started from cmd.exe and then nested and then the topmost TCC is ended. I took the topmost out via procexp and the execution flow of a .cmd file started from the nested TCC was no longer stable. It even was no longer possible to enter data in for instance Firefox. Start from TCC and stick by it, that is my suggestion. TCC is a far better cmd.exe than cmd.exe itself.

With Regards,
Eric-Jan,
The Netherlands.

By the way these nasty localisation problems in the last version of WsusOffline for which I was given a workaround by your forum should not be that difficult to fix. Am I right. :roll:
Last edited by EricJanHteA on 09.04.2011, 00:50, edited 1 time in total.
EricJanHteA
 

Re: Network Share Support

Postby boco » 08.04.2011, 21:11

As a software creator, you have to take licenses into account. I'm almost 100% sure the license of TCC is completely incompatible with the GPL (which WSUSOU is released under). This makes it impossible to include it into the official release.

Implementing it for yourself - Yes.
Creating documentation so others can implement it for theirselves, too - Yes.
Including it in the official release - No.

Besides, WSUSOU is not meant to be used with network shares at all.
Microsoft update catalog: http://catalog.update.microsoft.com/v7/site/
Windows Install media download: https://support.microsoft.com/en-us/help/15088/windows-create-installation-media
boco
 
Posts: 2391
Joined: 24.11.2009, 17:00
Location: Germany

Re: Network Share Support

Postby EricJanHteA » 09.04.2011, 00:46

Forgive me please. GPL's etc are not my strongest point. But could you please enlighten me.

This is what I found:

From http://www.gnu.org/philosophy/free-sw.html (about free software)
Code: Select all
- The freedom to run the program, for any purpose (freedom 0).
- The freedom to study how the program works, and change it to make it do what
  you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help your neighbor (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3).
  By doing this you can give the whole community a chance to benefit from your
  changes. Access to the source code is a precondition for this.


From http://technet.microsoft.com/en-us/sysinternals/bb847944 (Sysinternals)
Code: Select all
Q: May I distribute Sysinternals utilities in my software, on my website,
   or with my magazine?
A: No. We are not offering any distribution licenses, even if the 3rd party is
   distributing them for free. We encourage people to download the utilities from
   our download center where they can be assured to get the most recent version
   of the utility.

Q: Can I license or re-use any Sysinternals source code?
A: No. We will no longer offer the Sysinternals source code for download or license.


- WsusOffline is build with and collects numerous apps from Microsoft. And in the second fase
of the process executes these collected, and packaged together with self written, apps. Some
of these apps are even signed and copyrighted by Microsofts Mark Russinovich. One could say
Microsoft is not known for bringing out a lot of GPL software these days. As far as I know.

- Wsusoffline is also aimed at users who themselves not always tend to go the straight way. For
instance some very not GPL aimed updates of mister Microsoft are blacklisted from being
collected.

- Where on earth is GPL comming into this equation. I really really do not understand. Please help
me out.

As a suggestion to the builders. If copyright and licenses are of really concern to you (i would think
twice), do not enclose utilities owned by Microsoft in your distribution of WsusOffline. What you
could do is download them at execution time (with a GPL-ed :lol: tool of course). As such the
wonderful free but not GPL-ed tools of the world come into grasp with less risk of being nicked.
And if you ever think of making WsusOffline UNC compliant you could do the same with TCC. But
if I am guessing right, the owner of TCC/LE might be less obstructive as mister Microsoft.

And as a last remark. I saw a thread with a very lively discussion on how to use network shares
in WsusOffline. WSUSUpdateAdmin is even involved. I think of contributing to that thread with
pointing out to a free tool that might come in handy for that sake. But in the end I feel...., some
would say: "a little bit bullied around" by someone who was not even contributing to that thread
at all. What am I missing? Because in the future I would like to have my contributions taken
seriously or at least ignored. Else I plan not to make contributions at all. It is that simple.

With the utmost and highest Regards,
Eric-Jan,
The Netherlands.
Last edited by EricJanHteA on 09.04.2011, 14:26, edited 1 time in total.
EricJanHteA
 

Re: Network Share Support

Postby EricJanHteA » 09.04.2011, 14:19

EricJanHteA wrote:...
As a suggestion to the builders. If copyright and licenses are of really concern to you (i would think
twice), do not enclose utilities owned by Microsoft in your distribution of WsusOffline. What you
could do is download them at execution time (with a GPL-ed :lol: tool of course). As such the
wonderful free but not GPL-ed tools of the world come into grasp with less risk of being nicked.
And if you ever think of making WsusOffline UNC compliant you could do the same with TCC. But
if I am guessing right, the owner of TCC/LE might be less obstructive as mister Microsoft
....


Ok, I can not deny it I am a newcomer at WsusOffline. I took the liberty to walk through your Trac
sources and saw to my great relief and shame that what I had suggested in my previous reply is
exact what your guys are doing already via your static downloads.

The second part of my quoted reply still stands. Nothing is in your way to give TCC exact the same
treatment and get TCC at runtime. For it is free and can be used in exact the same way as the
Sysinternals stuff.

But as Boco states you will probably never do that. Why is not clear to me. But then again I am just
a newbie.

But still TCC might come in handy as your client server experiments are developing. You never know.

Still feel a bit welcomed at the door by someone with a baseball bat.

But I will leave it at that. No hard feelings any more by me.

Grußjen von EJ aus Holland.
Die tulpen wachsen wieder.
EricJanHteA
 

Next

Return to Anregungen / Suggestions

Who is online

Users browsing this forum: No registered users and 35 guests