Page 1 of 1

[solved] destination folder (UNC-Path)

PostPosted: 13.09.2011, 19:30
by idmanager
Hi
been using this software to download win7 x86 updates and then using dism to add them to an offline image for winpe and imagex to use
but now i have a few x64 machines and would like to change the script to put x86 into one folder and x64 into another .
can you please tell me the cmd command to select the destination folder for each update..
Thanks
Rob

Re: destination folder

PostPosted: 14.09.2011, 09:42
by aker
I'm integrating Updates into Windows PE too.
The x86 Updates are located in .\client\w61\glb\, the x64 updates in .\client\w61-x64\glb\.
Integration is the same.
Code: Select all
# mount image
dism /mount-wim /Wimfile:<wim> /index:<Index> /mountdir:<mountdir>
# integrate
dism /image:<mountdir> /add-package /packagepath:".\client\w61-x64\glb"
# commit & unmount
dism /unmount-wim /mountdir:<mountdir> /commit

There is no command for another folder.
WSUSOU sorts the updates by itself.

Re: destination folder

PostPosted: 14.09.2011, 17:12
by idmanager
Thanks
I download the updates via one server then i robocopy the files to another server that has not got
internet access and add to the images, i have it now copying x64 updates to one folder and x86 to another from the robocopy command, this is a great script and saves me hours as well as keeping my
images and my pcs that dont have internet access updated . thanks again

Re: destination folder

PostPosted: 16.09.2011, 13:37
by gpburth
if you want to only copy the updates for, say, w61-x64 you can also use the CopyToTarget skript included unter cmd (CopyToTarget.cmd w61-x64 x:\win7-64). Perhaps it also works with UNC paths?
But then again this copies the "support structure" for WOU, too (like the "USB" part of the GUI).

Re: destination folder

PostPosted: 16.09.2011, 19:28
by aker
No it does not work with UNC-Paths because CMD doesn't Support UNC-Paths.
But that isn't a problem of WSUSOU, it's a problem of Windows.

Re: destination folder

PostPosted: 19.09.2011, 07:06
by gpburth
Windows cmd supports UNC-Paths in (some) built-in functions

Examples:
Code: Select all
copy test.txt \\server\freigabe\
        1 Datei(en) kopiert.


cd won't work, that's why the wrong assumption "cmd does not support UNC" is in everybodys head. The problem is only DOS-backwards-compatibility, since some DOS programs relied on "current folder" having a drive letter, where "current folder" means the currently selected folder on the commandline.

Copy does, even for DFS-paths. I use it every day, works at least back down to Server 2003. If copying to a folder don't forget the trailing backslash.

Dir etc work, too:
Code: Select all
C:\Users\xxxxx\Desktop>dir \\DFS-root\Users\xxxxx
 Volume in Laufwerk \\DFS-root\Users: hat keine Bezeichnung.
 Volumeseriennummer: E859-FD1D

 Verzeichnis von \\DFS-root\Users\xxxxx

19.09.2011  07:50    <DIR>          xxxxx
               0 Datei(en),              0 Bytes
               1 Verzeichnis(se), 30.351.244.092 Bytes frei

Even starting programs works (since the "current folder" has a drive letter ;-))

Just try it, don't believe what everyone "knows" :D

Re: destination folder

PostPosted: 19.09.2011, 15:20
by aker
I didn't know that.

PS.: German is OK in this forum.

Re: destination folder

PostPosted: 20.09.2011, 09:30
by WSUSUpdateAdmin
Hi.

gpburth wrote:Windows cmd supports UNC-Paths in (some) built-in functions
Examples:
Code: Select all
copy test.txt \\server\freigabe\
        1 Datei(en) kopiert.

cd won't work, that's why the wrong assumption "cmd does not support UNC" is in everybodys head. [...]

Yes.
That's the reason why CopyToTarget.cmd does support UNC paths as <OutputPath>, whereas CopyToTarget.cmd and others do not support UNC paths as the current directory.

RTW