arjanv Posted January 18, 2006 Share Posted January 18, 2006 Hi, Is it possible to execute autopatcher from a network? What i like to do is: I've extracted/installed the latest autopatcher xp I moved the complete autopatcher directory from programfiles to a net workshare. I've placed this command in winbom.ini [OemRunOnce] "AutoPatcher","""\\servername\d\AutoPatcher\AutoPatcher.exe"" " but after i agree with the terms of use i get a runtime error 5 anyone suggestions? Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/ Share on other sites More sharing options...
rtk Posted January 18, 2006 Share Posted January 18, 2006 arjanv said: Hi, Is it possible to execute autopatcher from a network? What i like to do is: I've extracted/installed the latest autopatcher xp I moved the complete autopatcher directory from programfiles to a net workshare. I've placed this command in winbom.ini [OemRunOnce] "AutoPatcher","""\\servername\d\AutoPatcher\AutoPatcher.exe"" " but after i agree with the terms of use i get a runtime error 5 anyone suggestions? Yeah, autopatcher will only run from a mapped drive from a network share. I used pushd and popd to temporarily map a drive and run autopatcher in between. Threw it into a batch file, and with CMDOW the cmd window calling the batch can even be hidden. My batch is as follows: ---------------------------- @copy /y \\servername\autopatcher\cmdow.exe %systemroot%\system32\cmdow.exe @cmdow @ /hid pushd \\servername\autopatcher autopatcher.exe /noeula /unattend:t2 popd \\servername\autopatcher ---------------------------- Of course, the /noeula prevents having to accept the eula, and the unattend:t2 completes the unattended aspect with just a small notification window. You could also use t3 to make it completely invisible. This is in my startup scripts though, not during an unattended OS install, so YMMV. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587081694 Share on other sites More sharing options...
arjanv Posted January 18, 2006 Author Share Posted January 18, 2006 (edited) rtk said: Yeah, autopatcher will only run from a mapped drive from a network share. I used pushd and popd to temporarily map a drive and run autopatcher in between. Threw it into a batch file, and with CMDOW the cmd window calling the batch can even be hidden. My batch is as follows: ---------------------------- @copy /y \\servername\autopatcher\cmdow.exe %systemroot%\system32\cmdow.exe @cmdow @ /hid pushd \\servername\autopatcher autopatcher.exe /noeula /unattend:t2 popd \\servername\autopatcher ---------------------------- Of course, the /noeula prevents having to accept the eula, and the unattend:t2 completes the unattended aspect with just a small notification window. You could also use t3 to make it completely invisible. This is in my startup scripts though, not during an unattended OS install, so YMMV. Thanks, Ill give it a try What does this command actually does? pushd and popd? What i want to do is add updates to autopatcher without making a new ghost image. So i only have to update/add updates to autopatcher which is placed on a network share. I hope you understand what i mean Edited January 18, 2006 by arjanv Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587081865 Share on other sites More sharing options...
rtk Posted January 18, 2006 Share Posted January 18, 2006 arjanv said: Thanks, Ill give it a try What does this command actually does? pushd and popd? What i want to do is add updates to autopatcher without making a new ghost image. So i only have to update/add updates to autopatcher which is placed on a network share. I hope you understand what i mean Sure do, I do exactly the same thing for the same reasons. Autopatcher has reduced my image creation tasks easily by half. We manually run autopatcher on our newly ghosted machines, and run it automatically on each startup to keep our machines completely updated. According to the help files, pushd "will create a temporary drive letter that points to that specified network resource and then change the current drive and directory, using the newly defined drive letter. Temporary drive letters are allocated from Z: on down, using the first unused drive letter found." Popd "will delete any temporary drive letter created by PUSHD when you POPD that drive off the pushed directory stack." You could of course just create a permanent drive mapping (not you yourself, you figuratively) and not bother with pushd and popd, but in my environment I can't be sure any drive letter is free, so this works to pick one for me. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587082077 Share on other sites More sharing options...
arjanv Posted January 19, 2006 Author Share Posted January 19, 2006 rtk said: Sure do, I do exactly the same thing for the same reasons. Autopatcher has reduced my image creation tasks easily by half. We manually run autopatcher on our newly ghosted machines, and run it automatically on each startup to keep our machines completely updated. According to the help files, pushd "will create a temporary drive letter that points to that specified network resource and then change the current drive and directory, using the newly defined drive letter. Temporary drive letters are allocated from Z: on down, using the first unused drive letter found." Popd "will delete any temporary drive letter created by PUSHD when you POPD that drive off the pushed directory stack." You could of course just create a permanent drive mapping (not you yourself, you figuratively) and not bother with pushd and popd, but in my environment I can't be sure any drive letter is free, so this works to pick one for me. Hi, rtk Thanks for your help. It works perfectly. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587085440 Share on other sites More sharing options...
arjanv Posted January 19, 2006 Author Share Posted January 19, 2006 arjanv said: Hi, rtk Thanks for your help. It works perfectly. Do you know it's possible to run autopatcher fullscreen? Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587085582 Share on other sites More sharing options...
rtk Posted January 20, 2006 Share Posted January 20, 2006 "arjanv" said: Do you know it's possible to run autopatcher fullscreen? Never found a way myself, but the good news is it appears to be an option for AP 6.0, maximized at least. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587092228 Share on other sites More sharing options...
arjanv Posted January 21, 2006 Author Share Posted January 21, 2006 rtk said: Never found a way myself, but the good news is it appears to be an option for AP 6.0, maximized at least. is there allready a beta version of ap 6? Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587095281 Share on other sites More sharing options...
+M2Ys4U Subscriber¹ Posted January 21, 2006 Subscriber¹ Share Posted January 21, 2006 of the core program, yes, but the only release using it is the 64 bit version of APXP. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587095310 Share on other sites More sharing options...
HomePCPros Posted February 1, 2006 Share Posted February 1, 2006 :yes: This Deserves a sticky! Bump I tried mapping with net use without any luck, this worked great! Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587142377 Share on other sites More sharing options...
rtk Posted February 1, 2006 Share Posted February 1, 2006 HomePCPros said: :yes: This Deserves a sticky! Bump I tried mapping with net use without any luck, this worked great! I'd vote for it to be added to the "FAQ / Common Problems & Solutions" thread instead of making this one sticky. At least or until AP supports UNC paths, this solution does seem to work well. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587142566 Share on other sites More sharing options...
ekk Posted March 13, 2006 Share Posted March 13, 2006 I don't have a lot of experience with AutoPatcher but the batch method described worked perfectly. 1. Can new updates be applied to the network share or does it need to be done locally and copied to the share? 2. Is there a way to configure so that the user installing can select when the system is restarted instead of it automatically rebooting? 3. How do I configure AutoPatcher to have all the available Critical and Recommended updates as the default? Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587304240 Share on other sites More sharing options...
RGabriele Posted July 10, 2006 Share Posted July 10, 2006 Thanks rtk !!! Q1: In wanting to use a /defaults ini like: /noeula /defaults:C:\AutoPatcher\elmcity.ini What variable would be used for the drive letter? Q2: When ever I open the batch file from the AP share on the server \\Server\AutoPatcher The first thing I get is this error CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. no big deal, the next step works anyways - but is there a way to get rid of this? Do you run it from C: instald of the share Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587688719 Share on other sites More sharing options...
Caledai Posted July 11, 2006 Share Posted July 11, 2006 try changing the first line to @copy /y cmdow.exe %systemroot%\system32\cmdow.exe Theoretically it will copy cmdow from the directory which launched the batch script. Thats where the UNC paths error is occuring. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587690448 Share on other sites More sharing options...
PsiMoon314 Posted July 11, 2006 Share Posted July 11, 2006 Hi, As an option, you can use a .CMD file directly from the share or a remote drive using the following code: @echo off pushd %~dp0 autopatcher popd Place this in a .CMD file and place it in the same folder as autopatcher.exe. The %~dp0 code means "My Expanded Drive and Path" e.g the path to the .CMD file itself. This means the code is portable to any folder without being changed. The only fly in the ointment here is that the .CMD window will not change to the working directly if the path is in a UNC path. However the code will still run anyway. There is a Registry fix for this issue; when I locate the settings I will update my posting. Kind Regards Simon Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587691075 Share on other sites More sharing options...
RGabriele Posted July 13, 2006 Share Posted July 13, 2006 Appreciate the support ... still getting error. I will try to clarify more.... I d-click ap.bat (code below) from here \\server\AutoPatcher Quote pushd \\Server\AutoPatcherpause autopatcher.exe /noeula popd \\Server\AutoPatcher FYI same thing happens when I d-click ap2.bat (code below) from here \\server\AutoPatcher Quote pausepushd %~dp0 pause autopatcher /noeula popd Here's the error - I think it's just from running a BATCH file from a unc path - pushd %~dp0 works nicely!!! Quote '\\Server\AutoPatcher'CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. C:\WINDOWS>pushd \\Server\AutoPatcher\ Y:\>pause Press any key to continue . . . OH can anyone answer my first question? Q1: In wanting to use a /defaults ini like: /noeula /defaults:C:\AutoPatcher\elmcity.ini => /noeula /defaults:???\AutoPatcher\elmcity.ini What variable would be used for the drive letter? - Thank You - Thank You - Thank You - Thank You - Thank You - Thank You - Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587696038 Share on other sites More sharing options...
RGabriele Posted July 13, 2006 Share Posted July 13, 2006 Ah ha! No longer getting "UNC paths are not supported" error Found this reg tweak at http://www.ss64.com/nt/cmd.html ;Allow UNC paths at command prompt [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "DisableUNCCheck"=dword:00000001 still need help here: Q1: In wanting to use a /defaults ini like: /noeula /defaults:C:\AutoPatcher\elmcity.ini => /noeula /defaults:???\AutoPatcher\elmcity.ini What variable would be used for the drive letter? Also ... anyone have a reference for directory commands between percentage marks??? like %system32% and PsiMoon314 where did you find %~dp0 !!! Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587697551 Share on other sites More sharing options...
rtk Posted July 14, 2006 Share Posted July 14, 2006 RGabriele said: Ah ha! No longer getting "UNC paths are not supported" error Found this reg tweak at http://www.ss64.com/nt/cmd.html ;Allow UNC paths at command prompt [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "DisableUNCCheck"=dword:00000001 I'd guess this prevents the check, which would prevent the "error" from appearing only. Still a good find though. ;-) RGabriele said: still need help here:Q1: In wanting to use a /defaults ini like: /noeula /defaults:C:\AutoPatcher\elmcity.ini => /noeula /defaults:???\AutoPatcher\elmcity.ini What variable would be used for the drive letter? Also ... anyone have a reference for directory commands between percentage marks??? like %system32% and PsiMoon314 where did you find %~dp0 !!! @PsiMoon: truly a good find, that %~dp0. @Rgabriele, google it and you'll find several sources of info on what it is and does. From Loren Halvorson's Blog : Silly batch file tricks, redirecting stdout into an evironment variable and %~dp0 Since I'm on the topic of useful/(or useless?) batch file tricks, another little known one I find myself using alot is the "%~dp0" macro which resolves to the fully expanded path to the directory containing the batch file. This allows batch files to run regardless of the current working directory. Based on this, I'd probably be experimenting with not having a path at all.... /noeula /defaults:elmcity.ini or /noeula /defaults:.\elmcity.ini maybe? Let us know how you make out! Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587701560 Share on other sites More sharing options...
rtk Posted July 14, 2006 Share Posted July 14, 2006 RGabriele said: Also ... anyone have a reference for directory commands between percentage marks??? What environment variables are available in Windows? and Environment Variables Windows 2000/XP : Tech Observer Are both pretty good references for what you're looking for.... rtk Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587701807 Share on other sites More sharing options...
RGabriele Posted July 18, 2006 Share Posted July 18, 2006 You nailed rtk DisableUNCCheck prevents the check, which would prevent the "error" from appearing only So no real need to bother with the DisableUNCCheck, since it works either way This is simple and works - maps, runs from anywhere, and then disappears - cool! Quote pushd %~dp0 autopatcher /noeula /defaults:elmcity.ini popd Thanks for the environment variables links ... was looking all over w/o any luck Here's a microsoft link ... same info http://www.microsoft.com/resources/documen...w.mspx?mfr=true Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587712251 Share on other sites More sharing options...
stephenperry Posted August 6, 2006 Share Posted August 6, 2006 do you have to load autopatcher onto each of the client computers before it will work over a network share? Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587762260 Share on other sites More sharing options...
+theblazingangel MVC Posted August 7, 2006 MVC Share Posted August 7, 2006 no, the whole idea is you access the network share and run it from there. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587766368 Share on other sites More sharing options...
GrimlockX2 Posted August 10, 2006 Share Posted August 10, 2006 I'd just like to point out that cmdow.exe is detected as a 'Hacker Tool' by some anti-virus programs. I love to run AP from a central server when doing updates on collegues machines but having a 'Hacker Tool' installed didn't go over so well with some of them (at least until I had a chance to explain). Mostly Norton does this (ugh Norton...) and describes it as "A tool used to hide command windows and run secret commands" or something similar. Regardless of what it is I just thought I'd point this out before it happens to someone else. There were two solutions I tried, the first was to add a DEL command to the end of the batch file to remove cmdow.exe from the system root, but that didn't always work (seems Norton likes to lock and quarantine the file without notifying me). The second option use this as the first line of the batch file instead: @\\ComputerName\AutoPatcher\cmdow.exe @ /hid None of the antivirus programs seem to care at all about this (probably because they don't scan unmapped network shares) so it all works out for the best. Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587772349 Share on other sites More sharing options...
PsiMoon314 Posted August 10, 2006 Share Posted August 10, 2006 Hi Guys, I am glad that the %~dp0 info worked for you :D This sort of .CMD code has been used for a while when making Windows PE / BartPE based boot CD's and the plugins that this uses. Here are some others you can use: @echo off setlocal enableextensions cls echo. echo I am file (not yet expanded): %0 echo My Expanded File Name: %~n0 echo My Expanded Extension: %~x0 echo My Expanded Name and Extension: %~nx0 echo My Expanded Drive: %~d0 echo The Expanded Root of My Drive: %~d0\ echo Some Other Expanded Path on My Drive: %~d0\SomeOtherPath echo My Expanded Path: %~p0 echo My Expanded Drive and Path: %~dp0 echo My Expanded full filename and path %~f0 echo My Expanded short filename path %~dps0 echo. These others might come in useful for other projects. I use this code as a reference. Pop it into a .CMD file and run it to see the output. Kind Regards Simon Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-587772769 Share on other sites More sharing options...
IntegraTek Posted March 3, 2007 Share Posted March 3, 2007 How do you control which updates are installed? When testing this process it appears as though it installed everything (specifically IE 7, windows journal and Windows Defender). Link to comment https://www.neowin.net/forum/topic/422251-launch-autopatcher-from-networkshare/#findComment-588365294 Share on other sites More sharing options...
Recommended Posts