Recommended Posts

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

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.

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 by arjanv

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.

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.

  • 2 weeks later...

: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.

  • 1 month later...

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?

  • 3 months later...

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

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

Appreciate the support ... still getting error. I will try to clarify more....

I d-click ap.bat (code below) from here \\server\AutoPatcher

pushd \\Server\AutoPatcher

pause

autopatcher.exe /noeula

popd \\Server\AutoPatcher

FYI same thing happens when I d-click ap2.bat (code below) from here \\server\AutoPatcher

pause

pushd %~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!!!

'\\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 -

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 !!!

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. ;-)

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!

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!

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

  • 3 weeks later...

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.

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

  • 6 months later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I bought this game. Played it for an hour, and then got a refund from Steam. Not a fun game at all.
    • Nothing Ear buds with active noise cancellation are at their lowest price ever with 51% off by Fiza Ali Amazon is currently offering the Nothing Ear wireless earbuds at their lowest price ever with 51% off limited prime deal. The earbuds feature an 11mm dynamic drivers with a ceramic diaphragm, and support high-resolution audio codecs including AAC, SBC, LDAC, and LHDC 5.0. They support active noise cancellation of up to 45dB across a frequency range of up to 5000Hz, and include a smart ANC algorithm, adaptive noise cancellation, and a transparency mode that allows surrounding sounds to be heard when needed. Connectivity is provided via Bluetooth 5.3, with support for multiple profiles including HFP, A2DP, AVRCP, and others. The earbuds also support dual connection, allowing them to be paired with two devices at the same time. Additional features include IP54 water and dust resistance for the earbuds and IP55 for the charging case, in-ear detection, pinch controls, low-latency mode, Google Fast Pair, Microsoft Swift Pair, and a three-microphone system per earbud for clearer voice calls. The Nothing X app, available on Android and iOS, provides access to custom EQ settings, bass enhancement, personal sound profiles, ear tip fit testing, firmware updates, customisable controls, dual-device management, and a find-my-earbuds feature. In terms of battery performance, each earbud has a 46mAh battery and the charging case has a 500mAh capacity. With active noise cancellation (ANC) turned off, the earbuds should offer up to 8.5 hours of playback on a single charge and up to 40.5 hours in total with the charging case. With ANC enabled, playback should last up to 5.2 hours on the earbuds and up to 24 hours with the case. For calls, talk time should reach up to 5 hours on the earbuds and 23 hours with the case when ANC is off, while ANC on should provide up to 4 hours on the earbuds and 18 hours with the case. Finally, fast charging should deliver up to 10 hours of playback from 10 minutes of charging when ANC is disabled. Nothing Ear Wireless Earbuds Bluetooth: $73.15 (Amazon US) - 51% off Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • Microsoft officially launched its Copilot Cowork enterprise AI agent on June 16, 2026, switching to usage-based pricing on the same day it disclosed it is considering a Microsoft-hosted version of China's DeepSeek V4 as a lower-cost engine for the platform — a pairing that puts the company on a collision course with both its enterprise customers' security teams and a White House that has spent months trying to wall off Chinese AI from American infrastructure.................... https://www.techtimes.com/articles/318647/20260618/microsoft-eyes-deepseek-v4-copilot-cowork-what-azure-hosting-cannot-fix.htm  
    • Forza Horizon 6 gets another hotfix for one of the game's online modes by Taras Buria Recently, Forza Horizon 6 players discovered an interesting glitch that allowed farming a crazy amount of in-game credits in a few minutes. Playground Games quickly pulled the plug on the exploit by disabling one of the game's online modes, and today, the studio is rolling out another hotfix. In my review, I complained about the game still showering gamers with cars, credits, and wheelspins. As such, earning money in Forza Horizon 6 is not a particularly difficult task. You simply have to play the game, crazy, I know. However, people still found an easier path to becoming a billionaire in Forza Horizon 6. All you had to do was purchase the Hummer EV, install a specific tune, shift in reverse while going at about 15 MPH, hit a wall, and get launched into the stratosphere at the speed of light. While mid-air, launch Eliminator and quickly get eliminated. Boom, the game just awarded you with a few million in-game credits. Initially, Playground Games disabled Eliminator to prevent people from farming credits. Now, following the release of the first balancing update, developers are rolling out a new update that re-enables Eliminator and gives users a free McLaren Sabre as a gesture of goodwill. Here is the changelog: One critical issue remains unpatched, though. There are quite a few reports of the game wiping gamers' saves, and developers are still looking into that. To avoid potential data loss, Playground Games recommends taking one of the steps outlined in a previously published support article.
  • Recent Achievements

    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      591
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      76
    4. 4
      Michael Scrip
      67
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!