entering ctrl character in batch file

View: New views
14 Messages — Rating Filter:   Alert me  

entering ctrl character in batch file

by prateek007sharma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi.i m new to batch programming,its awsome,so powerful.

i have few problems.

it goes like this-i get a virus repeatedly on my system,so  i have to
follow this procedure for that:end explorer.exe->delete virus from
windows system32 directory->delete all traces of virus from
registry->removing it from startup->then restart.

deleting it from windows system32 directory is wat i have got,the then
it opens the registry also,problem starts from here->but then how do i
open the find option in edit menu of registry,then delete the registry
value if it is present otherwise delete it from startup.also how to
end explorer.exe using batch file.

can anyone advice any good book on DOS/Batch file programming?i have
searched a lot on net but not been able to find any.


Re: entering ctrl character in batch file

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 07 Feb 2008 17:26:13 -0000, "prateek007sharma"
<prateek007sharma@...> wrote:

>i have few problems.
>
>it goes like this-i get a virus repeatedly on my system,so  i have to
>follow this procedure for that:end explorer.exe->delete virus from
>windows system32 directory->delete all traces of virus from
>registry->removing it from startup->then restart.

>but then how do i delete the registry
>value if it is present otherwise delete it from startup.

You can use reg.exe to delete a registry value.

>also how to end explorer.exe using batch file.

Taskkill can end a process but explorer isn't the way to delete files in a
batch file.
Use something like this:

if exist "c:\path\filname.ext" del "c:\path\filname.ext"




selecting what to install

by Aristos M. Vasiliou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I don't know if this can be done using a batch file, but I though I'd ask anyway.

I have this batch file that installs a list of programs silently.

-------------------------------------------------------------------------------------------
"PureVideo Decoder v1.02\PureVideo.exe"

"Flash Player v9.0.115.0\Flash.msi" /qb

"Real Alternative v1.7.5\Real.exe" /VERYSILENT

"QuickTime Alternative v2.4.0\QuickTime.exe" /VERYSILENT

"WinRAR v3.71\wrar371.exe" /s
COPY /Y "%~dp0\WinRAR v3.71\rarreg.key" "%PROGRAMFILES%\WinRAR"
COPY /Y "%~dp0\WinRAR v3.71\WinRAR.exe" "%PROGRAMFILES%\WinRAR"

"Sun Java v6.0.3\SunJava.exe" /s /v/qn ADDLOCAL=jrecore IEXPLORER=1 JAVAUPDATE=0

"K-Lite Mega Codec Pack v3.8.0\CodecPack.exe" /verysilent /norestart /LoadInf=".\klmcp.ini"

"AVG Free v7.5\AVGFree.exe" /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP /QUIT_IF_INSTALLED
DEL "%ALLUSERSPROFILE%\Desktop\AVG 7.5.lnk"

"Nero Micro v8.2.8.0\Nero.exe" /SILENT /NORESTART /SERIAL="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx" /TYPE="compact"

"Adobe Acrobat Reader v8.1.2\AdobeReader.exe" /sPB /rs /rps /msi"ALLUSERS=TRUE EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Adobe Reader Speed Launcher" /f
DEL "%ALLUSERSPROFILE%\Desktop\Adobe Reader 8.lnk"

pause
-------------------------------------------------------------------------------------------

The thing is that using a batch file does not allow me to select which applications to install. I just run it, and it installs everything, even if some of the applications already exist on the computer.

Is there a way that this batch file will allow me to select what to install, before it starts going through the list?

Thanks

--eyXwo1EBUXbmpLaNzlKT4efdUG1xF3rqRqlEfCi-


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


Re: selecting what to install

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 28 Feb 2008 08:39:16 +0200, "Aristos M. Vasiliou"
<aristos@...> wrote:

>I have this batch file that installs a list of programs silently.
>
>-------------------------------------------------------------------------------------------
>"PureVideo Decoder v1.02\PureVideo.exe"
>
>"Flash Player v9.0.115.0\Flash.msi" /qb
>
>"Real Alternative v1.7.5\Real.exe" /VERYSILENT
>
>"QuickTime Alternative v2.4.0\QuickTime.exe" /VERYSILENT
>
>"WinRAR v3.71\wrar371.exe" /s
>COPY /Y "%~dp0\WinRAR v3.71\rarreg.key" "%PROGRAMFILES%\WinRAR"
>COPY /Y "%~dp0\WinRAR v3.71\WinRAR.exe" "%PROGRAMFILES%\WinRAR"
>
>"Sun Java v6.0.3\SunJava.exe" /s /v/qn ADDLOCAL=jrecore IEXPLORER=1 JAVAUPDATE=0
>
>"K-Lite Mega Codec Pack v3.8.0\CodecPack.exe" /verysilent /norestart /LoadInf=".\klmcp.ini"
>
>"AVG Free v7.5\AVGFree.exe" /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP /QUIT_IF_INSTALLED
>DEL "%ALLUSERSPROFILE%\Desktop\AVG 7.5.lnk"
>
>"Nero Micro v8.2.8.0\Nero.exe" /SILENT /NORESTART /SERIAL="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx" /TYPE="compact"
>
>"Adobe Acrobat Reader v8.1.2\AdobeReader.exe" /sPB /rs /rps /msi"ALLUSERS=TRUE EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"
>REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Adobe Reader Speed Launcher" /f
>DEL "%ALLUSERSPROFILE%\Desktop\Adobe Reader 8.lnk"
>
>pause
>-------------------------------------------------------------------------------------------
>
>The thing is that using a batch file does not allow me to select which applications to install. I just run it, and it installs everything, even if some of the applications already exist on the computer.
>
>Is there a way that this batch file will allow me to select what to install, before it starts going through the list?

A text editor on a copy of the batch file will allow you to remove the
lines you don't want. :-)

I guess it is possible to have a list displyed and you can press a letter
and ENTER for each one you don't want, to remove it from the list (and when
done use FIND to extract the ones left over into a temp batch file and run
it).


Some more information about what you need to do would be useful.



RE: selecting what to install

by Aristos M. Vasiliou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Mic,
 
I format and reinstall computers every day. Or they bring me a new laptop and I have to install some of the software below because currently it only runs the operating system. Or someone comes in and only wants 5 of the programs in the list. The thing is that this list of programs will become a lot bigger. There's only 10 programs now but I will keep adding and maybe I'll go up to 30. And I don't want to have to edit the batch file each time I want to select which programs to install.
 
Maybe a batch file wouldn't be such a practical solution, but I was just hoping. :-)
 
 

________________________________

From: batchworld@... on behalf of foxidrive
Sent: Thu 2/28/2008 8:56 AM
To: batchworld@...
Subject: Re: [BATCH WORLD] selecting what to install



On Thu, 28 Feb 2008 08:39:16 +0200, "Aristos M. Vasiliou"
<aristos@... <mailto:aristos%40aristos.net> > wrote:

>I have this batch file that installs a list of programs silently.
>
>----------------------------------------------------------
>"PureVideo Decoder v1.02\PureVideo.exe"
>
>"Flash Player v9.0.115.0\Flash.msi" /qb
>
>"Real Alternative v1.7.5\Real.exe" /VERYSILENT
>
>"QuickTime Alternative v2.4.0\QuickTime.exe" /VERYSILENT
>
>"WinRAR v3.71\wrar371.exe" /s
>COPY /Y "%~dp0\WinRAR v3.71\rarreg.key" "%PROGRAMFILES%\WinRAR"
>COPY /Y "%~dp0\WinRAR v3.71\WinRAR.exe" "%PROGRAMFILES%\WinRAR"
>
>"Sun Java v6.0.3\SunJava.exe" /s /v/qn ADDLOCAL=jrecore IEXPLORER=1 JAVAUPDATE=0
>
>"K-Lite Mega Codec Pack v3.8.0\CodecPack.exe" /verysilent /norestart /LoadInf=".\klmcp.ini"
>
>"AVG Free v7.5\AVGFree.exe" /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP /QUIT_IF_INSTALLED
>DEL "%ALLUSERSPROFILE%\Desktop\AVG 7.5.lnk"
>
>"Nero Micro v8.2.8.0\Nero.exe" /SILENT /NORESTART /SERIAL="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx" /TYPE="compact"
>
>"Adobe Acrobat Reader v8.1.2\AdobeReader.exe" /sPB /rs /rps /msi"ALLUSERS=TRUE EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES"
>REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Adobe Reader Speed Launcher" /f
>DEL "%ALLUSERSPROFILE%\Desktop\Adobe Reader 8.lnk"
>
>pause
>----------------------------------------------------------
>
>The thing is that using a batch file does not allow me to select which applications to install. I just run it, and it installs everything, even if some of the applications already exist on the computer.
>
>Is there a way that this batch file will allow me to select what to install, before it starts going through the list?

A text editor on a copy of the batch file will allow you to remove the
lines you don't want. :-)

I guess it is possible to have a list displyed and you can press a letter
and ENTER for each one you don't want, to remove it from the list (and when
done use FIND to extract the ones left over into a temp batch file and run
it).

Some more information about what you need to do would be useful.



 
--n9nD0sI0iAWnyFkXkb7NzZUESvBT5GIxrlfEe5--


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


RE: selecting what to install

by David Maunder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 
> I format and reinstall computers every day. Or they bring me
> a new laptop and I have to install some of the software below
> because currently it only runs the operating system. Or
> someone comes in and only wants 5 of the programs in the
> list.

I too can see value in this, having all everyday programs on a, say, 4
or 8 gig USB memory stick/thumb drive and having a simple menu using
'choice' popping up upon insertion of the memory stick. Selecting a
number or letter for the appropriate program would then just fire up the
'setup.exe' file of that particular program.


Re: selecting what to install

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 28 Feb 2008 09:15:55 +0200, "Aristos M. Vasiliou"
<aristos@...> wrote:

>Hi Mic,
>
>I format and reinstall computers every day. Or they bring me a new laptop and I have to install some of the software below because currently it only runs the operating system. Or someone comes in and only wants 5 of the programs in the list. The thing is that this list of programs will become a lot bigger. There's only 10 programs now but I will keep adding and maybe I'll go up to 30. And I don't want to have to edit the batch file each time I want to select which programs to install.
>
>Maybe a batch file wouldn't be such a practical solution, but I was just hoping. :-)

Here's a cool utility that will help you do that, and a batch file to test
it with.  It's able to be driven from the keyboard or via mouse clicks.

You create the list at the top of the batch file, and also the
corresponding entries for the temp batch in all the label entries.

http://home.mnet-online.de/horst.muc/w32dial.htm#wselect


@echo off
(
echo 1 ALLUSERSPROFILE=C:\Documents and Settings\All Users
echo 2 CF=c:\lists
echo 3 CLIENTNAME=Console
echo 4 ComSpec=C:\WINDOWS\system32\cmd.exe
echo 5 devmgr_show_nonpresent_devices=1
echo 6 FP_NO_HOST_CHECK=NO
echo 7 GET=$
echo 8 HOMEDRIVE=C:
echo 9 maxfind=C070203
echo 10 NUMBER_OF_PROCESSORS=2
echo 11 OS=Windows_NT
echo 12 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
echo 13 PROCESSOR_ARCHITECTURE=x86
echo 14 PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel
echo 15 PROCESSOR_LEVEL=6
echo 16 PROCESSOR_REVISION=0f06
echo 17 ProgramFiles=C:\Program Files
echo 18 PROMPT=$P$G
echo 19 SESSIONNAME=Console
echo 20 SystemDrive=C:
echo 21 SystemRoot=C:\WINDOWS
echo 22 TEMP=c:\Temp
echo 23 TMP=c:\Temp
echo 24 windir=C:\WINDOWS
echo 25 QUIT
)>tmp.txt
echo @echo off>temp.bat

:loop
for /f "tokens=1*" %%a in ('wselect tmp.txt "Wselect Variables" "$Item"
/oemlist /oemout') do (
if "%%b"=="QUIT" goto :run
call :%%a
findstr /r /v /c:"^%%a " tmp.txt>tmpb.txt
move tmpb.txt tmp.txt>nul
)
goto :loop

:run
del tmp.txt
echo Installing your programs
type temp.bat
echo Done
pause
goto :EOF

:1
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: ALLUSERSPROFILE=C:\Documents and Settings\All Users
goto :EOF

:2
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: CF=c:\lists>>temp.bat
goto :EOF

:3
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: CLIENTNAME=Console>>temp.bat
goto :EOF

:4
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: ComSpec=C:\WINDOWS\system32\cmd.exe>>temp.bat
goto :EOF

:5
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: devmgr_show_nonpresent_devices=1>>temp.bat
goto :EOF

:6
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: FP_NO_HOST_CHECK=NO>>temp.bat
goto :EOF

:7
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: GET=$>>temp.bat
goto :EOF

:8
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: HOMEDRIVE=C:>>temp.bat
goto :EOF

:9
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo :: maxfind=C070203>>temp.bat
goto :EOF

:10
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  NUMBER_OF_PROCESSORS=2>>temp.bat
goto :EOF

:11
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  OS=Windows_NT>>temp.bat
goto :EOF

:12
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH>>temp.bat
goto :EOF

:13
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PROCESSOR_ARCHITECTURE=x86>>temp.bat
goto :EOF

:14
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel>>temp.bat
goto :EOF

:15
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PROCESSOR_LEVEL=6>>temp.bat
goto :EOF

:16
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PROCESSOR_REVISION=0f06>>temp.bat
goto :EOF

:17
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  ProgramFiles=C:\Program Files>>temp.bat
goto :EOF

:18
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  PROMPT=$P$G>>temp.bat
goto :EOF

:19
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  SESSIONNAME=Console>>temp.bat
goto :EOF

:20
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  SystemDrive=C:>>temp.bat
goto :EOF

:21
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  SystemRoot=C:\WINDOWS>>temp.bat
goto :EOF

:22
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  TEMP=c:\Temp>>temp.bat
goto :EOF

:23
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  TMP=c:\Temp>>temp.bat
goto :EOF

:24
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo ::  windir=C:\WINDOWS>>temp.bat
goto :EOF




Re: selecting what to install

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 28 Feb 2008 19:28:04 +1100, foxidrive <foxidrive@...>
wrote:

>On Thu, 28 Feb 2008 09:15:55 +0200, "Aristos M. Vasiliou"
><aristos@...> wrote:
>
>>Hi Mic,
>>
>>I format and reinstall computers every day. Or they bring me a new laptop and I have to install some of the software below because currently it only runs the operating system. Or someone comes in and only wants 5 of the programs in the list. The thing is that this list of programs will become a lot bigger. There's only 10 programs now but I will keep adding and maybe I'll go up to 30. And I don't want to have to edit the batch file each time I want to select which programs to install.
>>
>>Maybe a batch file wouldn't be such a practical solution, but I was just hoping. :-)
>
>Here's a cool utility that will help you do that, and a batch file to test
>it with.  It's able to be driven from the keyboard or via mouse clicks.
>
>You create the list at the top of the batch file, and also the
>corresponding entries for the temp batch in all the label entries.
>
>http://home.mnet-online.de/horst.muc/w32dial.htm#wselect
>

This batch file is easier to examine - the numerals in the first column are
necessary in the list of items.  QUIT doesn't have to be entry 25 and can
be any numeral.

@echo off
(
echo 1  item 1
echo 2  item 2
echo 3  item 3
echo 4  item 4
echo 5  item 5
echo 6  item 6
echo 7  item 7
echo 8  item 8
echo 9  item 9
echo 10 item 10
echo 11 item 11
echo 12 item 12
echo 13 item 13
echo 14 item 14
echo 15 item 15
echo 16 item 16
echo 17 item 17
echo 18 item 18
echo 19 item 19
echo 20 item 20
echo 21 item 21
echo 22 item 22
echo 23 item 23
echo 24 item 24
echo 25 QUIT
)>tmp.txt
echo @echo off>temp.bat

:loop
for /f "tokens=1*" %%a in ('wselect tmp.txt "Wselect Variables" "$Item"
/oemlist /oemout') do (
if "%%b"=="QUIT" goto :run
call :%%a
findstr /r /v /c:"^%%a " tmp.txt>tmpb.txt
move tmpb.txt tmp.txt>nul
)
goto :loop

:run
del tmp.txt
echo Installing your programs
type temp.bat
echo Done
pause
goto :EOF

:1
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 1
goto :EOF

:2
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 2
goto :EOF

:3
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 3
goto :EOF

:4
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 4
goto :EOF

:5
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 5
goto :EOF

:6
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 6
goto :EOF

:7
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 7
goto :EOF

:8
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 8
goto :EOF

:9
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 9
goto :EOF

:10
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 10
goto :EOF

:11
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 11
goto :EOF

:12
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 12
goto :EOF

:13
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 13
goto :EOF

:14
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 14
goto :EOF

:15
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 15
goto :EOF

:16
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 16
goto :EOF

:17
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 17
goto :EOF

:18
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 18
goto :EOF

:19
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 19
goto :EOF

:20
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 20
goto :EOF

:21
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 21
goto :EOF

:22
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 22
goto :EOF

:23
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 23
goto :EOF

:24
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 24
goto :EOF


RE: selecting what to install

by Aristos M. Vasiliou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much for your help. I will give it a try. I also found this http://wpiw.net/ if anyone else is interested.
 
Thanks

________________________________

From: batchworld@... on behalf of foxidrive
Sent: Thu 2/28/2008 10:45 AM
To: batchworld@...
Subject: Re: [BATCH WORLD] selecting what to install



On Thu, 28 Feb 2008 19:28:04 +1100, foxidrive <foxidrive@... <mailto:foxidrive%40yahoo.com.au> >
wrote:

>On Thu, 28 Feb 2008 09:15:55 +0200, "Aristos M. Vasiliou"
><aristos@... <mailto:aristos%40aristos.net> > wrote:
>
>>Hi Mic,
>>
>>I format and reinstall computers every day. Or they bring me a new laptop and I have to install some of the software below because currently it only runs the operating system. Or someone comes in and only wants 5 of the programs in the list. The thing is that this list of programs will become a lot bigger. There's only 10 programs now but I will keep adding and maybe I'll go up to 30. And I don't want to have to edit the batch file each time I want to select which programs to install.
>>
>>Maybe a batch file wouldn't be such a practical solution, but I was just hoping. :-)
>
>Here's a cool utility that will help you do that, and a batch file to test
>it with. It's able to be driven from the keyboard or via mouse clicks.
>
>You create the list at the top of the batch file, and also the
>corresponding entries for the temp batch in all the label entries.
>
>http://home.mnet-online.de/horst.muc/w32dial.htm#wselect <http://home.mnet-online.de/horst.muc/w32dial.htm#wselect>
>

This batch file is easier to examine - the numerals in the first column are
necessary in the list of items. QUIT doesn't have to be entry 25 and can
be any numeral.

@echo off
(
echo 1 item 1
echo 2 item 2
echo 3 item 3
echo 4 item 4
echo 5 item 5
echo 6 item 6
echo 7 item 7
echo 8 item 8
echo 9 item 9
echo 10 item 10
echo 11 item 11
echo 12 item 12
echo 13 item 13
echo 14 item 14
echo 15 item 15
echo 16 item 16
echo 17 item 17
echo 18 item 18
echo 19 item 19
echo 20 item 20
echo 21 item 21
echo 22 item 22
echo 23 item 23
echo 24 item 24
echo 25 QUIT
)>tmp.txt
echo @echo off>temp.bat

:loop
for /f "tokens=1*" %%a in ('wselect tmp.txt "Wselect Variables" "$Item"
/oemlist /oemout') do (
if "%%b"=="QUIT" goto :run
call :%%a
findstr /r /v /c:"^%%a " tmp.txt>tmpb.txt
move tmpb.txt tmp.txt>nul
)
goto :loop

:run
del tmp.txt
echo Installing your programs
type temp.bat
echo Done
pause
goto :EOF

:1
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 1
goto :EOF

:2
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 2
goto :EOF

:3
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 3
goto :EOF

:4
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 4
goto :EOF

:5
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 5
goto :EOF

:6
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 6
goto :EOF

:7
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 7
goto :EOF

:8
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 8
goto :EOF

:9
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 9
goto :EOF

:10
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 10
goto :EOF

:11
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 11
goto :EOF

:12
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 12
goto :EOF

:13
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 13
goto :EOF

:14
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 14
goto :EOF

:15
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 15
goto :EOF

:16
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 16
goto :EOF

:17
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 17
goto :EOF

:18
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 18
goto :EOF

:19
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 19
goto :EOF

:20
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 20
goto :EOF

:21
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 21
goto :EOF

:22
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 22
goto :EOF

:23
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 23
goto :EOF

:24
>>temp.bat echo :: this programs selection items should be placed here
>>temp.bat echo rem item 24
goto :EOF



 
--wERr-zqArcOXvgqCZ0T1bdLmhNCd3ohccNmIaM2-


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


XCOPY exclude problem

by Aristos M. Vasiliou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is a bactch file I want to use for backing up:

---------------------------------------------------------------------
backup.cmd

SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause

---------------------------------------------------------------------
This is the contents of MyExcludes.txt file

"C:\Documents and Settings\user\Desktop\copy1\excludedfolder"
---------------------------------------------------------------------

And this is the result:


C:\Documents and Settings\user\Desktop>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /E
XCLUDE:"MyExcludes.txt"

C:\Documents and Settings\user\Desktop>SET RPATH="C:\Documents and Settings\user
\Desktop\copy1"

C:\Documents and Settings\user\Desktop>SET LPATH="C:\Documents and Settings\user
\Desktop\copy2"

C:\Documents and Settings\user\Desktop>XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyEx
cludes.txt" "C:\Documents and Settings\user\Desktop\copy1" "C:\Documents and Set
tings\user\Desktop\copy2"
Can't read file: "MyExcludes.txt"

0 File(s) copied

C:\Documents and Settings\user\Desktop>pause
Press any key to continue . . .
---------------------------------------------------------------------

I don't know why it cannot read from the MyExcludes.txt file.

Any ideas why?

Thanks

--QCoGB6t87AgvX2KizFTWTXYR4EuhdJZeSb8UPHz-


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


Re: XCOPY exclude problem

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 27 Mar 2008 11:03:16 +0200, "Aristos M. Vasiliou"
<aristos@...> wrote:

>This is a bactch file I want to use for backing up:
>
>---------------------------------------------------------------------
>backup.cmd
>
>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
>SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
>SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
>%COMMAND% %RPATH% %LPATH%
>pause



>Can't read file: "MyExcludes.txt"
>
>0 File(s) copied
>
>I don't know why it cannot read from the MyExcludes.txt file.

Take the double quotes away from the /EXCLUDE:"MyExcludes.txt" switch.



RE: XCOPY exclude problem

by Byrne, Derek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Mic,
 
  Aye, I tried that too, but it ended up skipping the /EXCLUDE switch entirely and copied the whole subdirectory:
  (was hoping to look into this further - eg. using a directory structure without spaces, hence removing the "" in the MyExcludes.txt file, but work, as usual, gets in the way *sigh*)
 
 
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>dir
 Volume in drive C has no label.
 Volume Serial Number is 68B2-4AE9
 Directory of C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch
27/03/2008  09:27    <DIR>          .
27/03/2008  09:27    <DIR>          ..
28/03/2008  10:02               218 backup.cmd
27/03/2008  09:26                65 MyExcludes.txt
               2 File(s)            283 bytes
               2 Dir(s)   3,956,375,552 bytes free
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type MyExcludes.txt
"C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>SET COMMAND=XCOPY /D /E
 /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>set RPATH="C:\Documents
 and Settings\dbyrne\Desktop\copy1"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>set LPATH="C:\Documents
 and Settings\dbyrne\Desktop\copy2"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>XCOPY /D /E /C /I /H /R
 /Y /EXCLUDE:MyExcludes.txt "C:\Documents and Settings\dbyrne\Desktop\copy1" "C:
\Documents and Settings\dbyrne\Desktop\copy2"
C:\Documents and Settings\dbyrne\Desktop\copy1\d2.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\d3.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder\d1.txt
3 File(s) copied
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>pause
Press any key to continue . . .
 

________________________________

From: batchworld@... on behalf of foxidrive
Sent: Thu 27/03/2008 13:58
To: batchworld@...
Subject: Re: [BATCH WORLD] XCOPY exclude problem



On Thu, 27 Mar 2008 11:03:16 +0200, "Aristos M. Vasiliou"
<aristos@... <mailto:aristos%40aristos.net> > wrote:

>This is a bactch file I want to use for backing up:
>
>----------------------------------------------------------
>backup.cmd
>
>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
>SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
>SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
>%COMMAND% %RPATH% %LPATH%
>pause

>Can't read file: "MyExcludes.txt"
>
>0 File(s) copied
>
>I don't know why it cannot read from the MyExcludes.txt file.

Take the double quotes away from the /EXCLUDE:"MyExcludes.txt" switch.



 
******************************************
Meteor Mobile Communications Limited, trading as Meteor.
Registered Office: 4030 Kingswood Avenue, Citywest Business Park, Naas Road, Dublin 24, Ireland.
Registered in Ireland: 282645

 
DISCLAIMER: This email and its attachments contain confidential information and may be legally privileged. The message is intended only for the addressee(s) stated above.  If you are not the named addressee(s) or intended recipient please do not use, copy, disseminate or disclose the information to anyone.  If you have received this email in error please immediately notify the sender at Meteor and delete the material from any system and destroy any copies.
******************************************


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


RE: XCOPY exclude problem

by Aristos M. Vasiliou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, my batch file skipped the /exclude too.

 

Aristos

 

From: batchworld@... [mailto:batchworld@...] On
Behalf Of Byrne, Derek
Sent: Friday, March 28, 2008 12:04 PM
To: batchworld@...
Subject: RE: [BATCH WORLD] XCOPY exclude problem

 

Hi Mic,

Aye, I tried that too, but it ended up skipping the /EXCLUDE switch
entirely and copied the whole subdirectory:
(was hoping to look into this further - eg. using a directory structure
without spaces, hence removing the "" in the MyExcludes.txt file, but
work, as usual, gets in the way *sigh*)


C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>dir
Volume in drive C has no label.
Volume Serial Number is 68B2-4AE9
Directory of C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch
27/03/2008 09:27 <DIR> .
27/03/2008 09:27 <DIR> ..
28/03/2008 10:02 218 backup.cmd
27/03/2008 09:26 65 MyExcludes.txt
2 File(s) 283 bytes
2 Dir(s) 3,956,375,552 bytes free
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type
MyExcludes.txt
"C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>SET
COMMAND=XCOPY /D /E
/C /I /H /R /Y /EXCLUDE:MyExcludes.txt
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>set
RPATH="C:\Documents
and Settings\dbyrne\Desktop\copy1"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>set
LPATH="C:\Documents
and Settings\dbyrne\Desktop\copy2"
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>XCOPY /D /E /C
/I /H /R
/Y /EXCLUDE:MyExcludes.txt "C:\Documents and
Settings\dbyrne\Desktop\copy1" "C:
\Documents and Settings\dbyrne\Desktop\copy2"
C:\Documents and Settings\dbyrne\Desktop\copy1\d2.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\d3.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder\d1.txt
3 File(s) copied
C:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>pause
Press any key to continue . . .


________________________________

From: batchworld@... <mailto:batchworld%40yahoogroups.com>
on behalf of foxidrive
Sent: Thu 27/03/2008 13:58
To: batchworld@... <mailto:batchworld%40yahoogroups.com>
Subject: Re: [BATCH WORLD] XCOPY exclude problem

On Thu, 27 Mar 2008 11:03:16 +0200, "Aristos M. Vasiliou"
<aristos@... <mailto:aristos%40aristos.net>
<mailto:aristos%40aristos.net> > wrote:

>This is a bactch file I want to use for backing up:
>
>----------------------------------------------------------
>backup.cmd
>
>SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:"MyExcludes.txt"
>SET RPATH="C:\Documents and Settings\user\Desktop\copy1"
>SET LPATH="C:\Documents and Settings\user\Desktop\copy2"
>%COMMAND% %RPATH% %LPATH%
>pause

>Can't read file: "MyExcludes.txt"
>
>0 File(s) copied
>
>I don't know why it cannot read from the MyExcludes.txt file.

Take the double quotes away from the /EXCLUDE:"MyExcludes.txt" switch.

******************************************
Meteor Mobile Communications Limited, trading as Meteor.
Registered Office: 4030 Kingswood Avenue, Citywest Business Park, Naas
Road, Dublin 24, Ireland.
Registered in Ireland: 282645

DISCLAIMER: This email and its attachments contain confidential
information and may be legally privileged. The message is intended only
for the addressee(s) stated above. If you are not the named addressee(s)
or intended recipient please do not use, copy, disseminate or disclose
the information to anyone. If you have received this email in error
please immediately notify the sender at Meteor and delete the material
from any system and destroy any copies.
******************************************

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

 



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


Re: XCOPY exclude problem

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 28 Mar 2008 10:04:05 -0000, "Byrne, Derek" <Derek.Byrne@...> wrote:

G'day Derek,

>  Aye, I tried that too, but it ended up skipping the /EXCLUDE switch entirely and copied the whole subdirectory:

Remove the double quotes from within the exclude file itself -  it would appear a different programmer wrote that bit, breaking the past methods.


c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
@echo off
echo C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder>MyExcludes.txt
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
pause
c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\copy1\d2.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\d3.txt
2 File(s) copied
Press any key to continue . . .


LightInTheBox - Buy quality products at wholesale price