Jump to content



Photo

launch autopatcher from networkshare


  • Please log in to reply
34 replies to this topic

#1 arjanv

arjanv

    Neowinian

  • Joined: 16-January 06

Posted 18 January 2006 - 15:01

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?


#2 rtk

rtk

    Neowinian

  • Joined: 18-February 05

Posted 18 January 2006 - 15:25

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.

#3 OP arjanv

arjanv

    Neowinian

  • Joined: 16-January 06

Posted 18 January 2006 - 16:11

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, 18 January 2006 - 16:54.


#4 rtk

rtk

    Neowinian

  • Joined: 18-February 05

Posted 18 January 2006 - 17:07

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.

#5 OP arjanv

arjanv

    Neowinian

  • Joined: 16-January 06

Posted 19 January 2006 - 07:40

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.

#6 OP arjanv

arjanv

    Neowinian

  • Joined: 16-January 06

Posted 19 January 2006 - 08:38

Hi, rtk

Thanks for your help.

It works perfectly.

Do you know it's possible to run autopatcher fullscreen?



#7 rtk

rtk

    Neowinian

  • Joined: 18-February 05

Posted 20 January 2006 - 20:11

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.

#8 OP arjanv

arjanv

    Neowinian

  • Joined: 16-January 06

Posted 21 January 2006 - 13:44

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?

#9 +M2Ys4U

M2Ys4U

    Your friendly neighbourhood Pirate!

  • Joined: 02-June 04
  • Location: England, UK, Europe

Posted 21 January 2006 - 14:00

of the core program, yes, but the only release using it is the 64 bit version of APXP.

#10 HomePCPros

HomePCPros

    Resident One Post Wonder

  • Joined: 01-February 06

Posted 01 February 2006 - 20:03

:yes: This Deserves a sticky! Bump
I tried mapping with net use without any luck, this worked great!

#11 rtk

rtk

    Neowinian

  • Joined: 18-February 05

Posted 01 February 2006 - 20:57

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

#12 ekk

ekk

    Resident One Post Wonder

  • Joined: 13-June 04

Posted 13 March 2006 - 23:18

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?

#13 RGabriele

RGabriele

    Lightning

  • Joined: 15-August 05
  • Location: New Haven, CT USA

Posted 10 July 2006 - 21:17

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

#14 Caledai

Caledai

    A Perfect Crystal, A heart of Ice - Frozen Forever

  • Joined: 26-August 04

Posted 11 July 2006 - 13:00

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.

#15 PsiMoon314

PsiMoon314

    Neowinian

  • Joined: 20-January 04

Posted 11 July 2006 - 16:35

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