Re: Ping: Malke

From: cquirke (MVP Windows shell/user) (cquirkenews_at_nospam.mvps.org)
Date: 04/03/05


Date: Sun, 03 Apr 2005 15:01:37 +0200

On Fri, 1 Apr 2005 10:38:51 -0500, "David H. Lipman"

>Your concern about being hard-coded to the c:\sysclean folder is
>indeed a good point.

As I mentioned by email, I'd like Bart PE use to be considered too.

>However, when providing something for others certain variables
>need to be set to constants and thus be "fixed" and not a variable.

I know that issue, well! I do a lot of stuff with hoary old .BAT
files, so what I do there is:

1) Set seldom-changed "boilerplate" variables

At the start of the .BAT I'd have things like...

Set WinPath=C:\WINDOWS
Set CabPath=F:\STORAGE\WIN98SE
Set CDR=H:

...and I might sub that out as a separate ,BAT to be called from other
.BAT if the info is to apply across many of them, assuming the
settings will affect the parent environment (I can't remember)

2) Paramatise from shortcut

Something like...

If "%5"=="" GoTo Help
Set DataDrv=%1
Set DataDir=%2
Set BackDrv=%3
Set BackDir=%4
Set BackName=%5
GoTo DoIt
:Help
Echo.
Echo Syntax: HD-Back X: \Data\Dir Y: \Back\Dir Name
Echo Where:
Echo X: = Drive letter where data is located
Echo \Data\Dir = Dir path where data is located
Echo Y: = Drive letter where backup is to be created
Echo \Back\Dir = Dir path where backup is to be created
Echo Name = Name for backup archive, 7 chars or less
Echo.
GoTo End
:DoIt

The problem with USB sticks and field use is you have to find them, as
you don't know what letter they'll use. So you need logic like that
used in the Win98 EBD's .BAT set, i.e. how that finds and sets %RAMD%,
as well as something unique for the search to look for.

Search from Z: to C: so that a malware can't drop that file and spoof
you into using ?malware'd material on the suspect HD.

>---------- ----- ---- --- -- - - - -
   Gone to bloggery: http://cquirke.blogspot.com
>---------- ----- ---- --- -- - - - -



Relevant Pages

  • Re: BATCH file "grab filename"
    ... I need a .bat file that does this: ... > with a .wma extension. ... > @ECHO OFF ... echo DEL %FileName%.wma /q ...
    (microsoft.public.win2000.general)
  • Re: Understandings a Batch file
    ... bat file. ... The user also runs this from a command prompt. ... @echo off ... echo You must enter a valid G drive directory formatExample: ...
    (microsoft.public.windowsxp.general)
  • Re: Help with Dos For/F command and sub folders
    ... I need to inspect each .txt file in each subfolder and count the ... @echo off ... I have tried calling this bat from another bat but with no results. ... the are spaces in the folder names, ...
    (microsoft.public.windowsxp.general)
  • Re: Logon BAT file
    ... @ECHO ON ... Find out of the bat is running at all. ... You really shouldn't be using Logon Batch files from the User PROPERTIES ... AND the GPO batch files together as it gets too confusing. ...
    (microsoft.public.windows.server.general)
  • Re: "New" ZFS crash on FS (pool?) unmount/export
    ... the box stopped responding to pings at 02:07AM and it has a cron backup job using zfs send/recv at 02:00, so I'm guessing it's related, even though the backup probably should have finished before then... ... Essentially, it creates a GEOM provider of a file, containing a zpool, imports the pool and creates a clone to it, and then exports the pool. ... Every time it crashes it seems to be during or very soon after the export - only this time it didn't even take the snapshots. ... echo Creating ggate device ...
    (freebsd-current)