Aristos Vasiliou | 22 May 13:47 2009
Picon

Install hotfixes executables

Hello,

I am currently using the following batch file to silently install microsoft hotfixes.

%~d0
pushd "\Software\Unattended\Install\Updates\XP\"
for /f "delims=" %%a IN ('dir *.exe /b') do "%%a" /q /n /z 
popd

EXIT

Is there a way for this batch file to work, regardless of the path? Because I keep a copy on my USB stick, and one
on a file server (to use on the network) and every time I make a change on either one and re-syncronize, one of
them stops working because of the path.

Thanks

[Non-text portions of this message have been removed]

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/

<*> Your email settings:
(Continue reading)

foxidrive | 22 May 14:02 2009
Picon

Re: Install hotfixes executables

On Fri, 22 May 2009 14:47:03 +0300, "Aristos Vasiliou"
<aristos@...> wrote:

>Is there a way for this batch file to work, regardless of the path? Because I keep a copy on my USB stick, and
one on a file server (to use on the network) and every time I make a change on either one and re-syncronize,
one of them stops working because of the path.

Maybe this will do:

%~d0

if exist "\Software\Unattended\Install\Updates\XP\" (
set folder="\Software\Unattended\Install\Updates\XP\")

if exist "\usbdisk\Software\Unattended\Install\Updates\XP\" (
set folder="\usbdisk\Software\Unattended\Install\Updates\XP\")

pushd %folder%
for /f "delims=" %%a IN ('dir *.exe /b') do "%%a" /q /n /z 
popd

EXIT

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

(Continue reading)

Ryan Johnson | 22 May 18:02 2009

Read File and Use in Batch

I want to have a batch file open a file that I am passing to it as %1, read the data inside that file and use that
later in the batch file.

At the command prompt I am typing this:

c:\>email_po.bat C:\Edi\Prod\xlate\i\52122\userexit

The userexit file only has this data in it:

PO_NUMBER=123456

I want to use the value of the PO_NUMBER in %2 in the batch file below:

c:\edisendmail.exe -r ryan.johnson@... -s "PO %2 Received" -t
"PO %2 Received"

So the subject of my email would read:

"PO 123456 Received"

How can I have the batch file get the valued after "PO_NUMBER=" so it can be used in my email string?

Thanks,

Ryan Johnson

------------------------------------

To Post a message, send it to:   batchworld@...

(Continue reading)

foxidrive | 22 May 18:31 2009
Picon

Re: Read File and Use in Batch

On Fri, 22 May 2009 16:02:04 -0000, "Ryan Johnson"
<ryan.johnson@...> wrote:

>I want to have a batch file open a file that I am passing to it as %1, read the data inside that file and use that
later in the batch file.
>
>At the command prompt I am typing this:
>
>c:\>email_po.bat C:\Edi\Prod\xlate\i\52122\userexit
>
>The userexit file only has this data in it:
>
>PO_NUMBER=123456
>
>I want to use the value of the PO_NUMBER in %2 in the batch file below:
>
>c:\edisendmail.exe -r ryan.johnson@... -s "PO %2 Received"
-t "PO %2 Received"
>
>
>So the subject of my email would read:
>
>"PO 123456 Received"
>
>How can I have the batch file get the valued after "PO_NUMBER=" so it can be used in my email string?

This is one way:

 <at> echo off
set /p var=<"C:\Edi\Prod\xlate\i\52122\userexit"
(Continue reading)

Ryan Johnson | 22 May 18:50 2009

Re: Read File and Use in Batch

Sweet!  I got it to work.  I appreciate your help!

------------------------------------

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@...! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/batchworld/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:batchworld-digest@... 
    mailto:batchworld-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    batchworld-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

(Continue reading)


Gmane