Jump to content

Recommended Posts

Posted

Another odd question from Somerset! Having trolled the various resources I

still can not find the answer, so here goes!

 

I have a duel boot with Win98/dos and win2k. I have a batch file that I

wish to run BEFORE windows loads that deletes all the index.dat files plus

many more, including emptying the temp folder.

 

The batch file works fine from win98 dos. Runs as command promt (but

obviously can not delete protected files).

 

I know can call it from the registry startup commands, but how do I run it

before windows even loads, preferably before the boot menu comes up?

Autoexec.bat doesn't run of course for Win2k and neither does a *.cmd batch

file.

  • Replies 7
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: Running batch files before Windows loads

 

 

"JR" <JR@discussions.microsoft.com> wrote in message

news:783E8A63-A0AF-441A-82B5-9FC868D50F22@microsoft.com...

> Another odd question from Somerset! Having trolled the various resources

> I

> still can not find the answer, so here goes!

>

> I have a duel boot with Win98/dos and win2k. I have a batch file that I

> wish to run BEFORE windows loads that deletes all the index.dat files plus

> many more, including emptying the temp folder.

>

> The batch file works fine from win98 dos. Runs as command promt (but

> obviously can not delete protected files).

>

> I know can call it from the registry startup commands, but how do I run it

> before windows even loads, preferably before the boot menu comes up?

> Autoexec.bat doesn't run of course for Win2k and neither does a *.cmd

> batch

> file.

>

 

Use the Task Scheduler (via the Control Panel) to schedule a job

at boot time. It should invoke a batch file of your own choice that

you use to delete whatever files you wish to delete.

Posted

Re: Running batch files before Windows loads

 

Thanks, but I do not have task scheduler on this win2k machine as dissabled

and removed long ago when tidying up a few items (I love twiddling!) and no

option to add scheduled tasks.

 

When a new program is installed it often runs a batch file before booting

windows, such as using Partition Magic to alter partitions.

 

What I would like to find is how this works.

 

I believe it is a "run" command or similar in winini.ini - but can find

little documentation!

 

Any other suggestions/help please

Guest Pegasus \(MVP\)
Posted

Re: Running batch files before Windows loads

 

 

"JR" <JR@discussions.microsoft.com> wrote in message

news:5A2F3645-40C5-49D5-9F72-FE3CFB17E793@microsoft.com...

> Thanks, but I do not have task scheduler on this win2k machine as

> dissabled

> and removed long ago when tidying up a few items (I love twiddling!) and

> no

> option to add scheduled tasks.

>

> When a new program is installed it often runs a batch file before booting

> windows, such as using Partition Magic to alter partitions.

>

> What I would like to find is how this works.

>

> I believe it is a "run" command or similar in winini.ini - but can find

> little documentation!

>

> Any other suggestions/help please

 

You really need the Task Scheduler. I do not think it's a good idea

to delete Windows components unless you know exactly what

you're deleting.

 

AFAIK, you can re-install the Task Scheduler by re-installing

IE6. Just download the latest version from the Microsoft site.

Alternatively you can right-click c:\winnt\mstask.inf, then select

"Install".

 

PQMagic probably runs a service to perform tasks at boot

time. Creating your own service would be far more time

consuming than creating a scheduled task, with exactly the

same end result.

Posted

Re: Running batch files before Windows loads

 

quoting:

> Another odd question from Somerset! Having trolled the various resources

I

> still can not find the answer, so here goes!

>

> I have a duel boot with Win98/dos and win2k. I have a batch file that I

> wish to run BEFORE windows loads that deletes all the index.dat files plus

> many more, including emptying the temp folder.

>

> The batch file works fine from win98 dos. Runs as command promt (but

> obviously can not delete protected files).

>

> I know can call it from the registry startup commands, but how do I run it

> before windows even loads, preferably before the boot menu comes up?

> Autoexec.bat doesn't run of course for Win2k and neither does a *.cmd

batch

> file.

 

 

I have used AutoExNT on my server to start a few things at the system level

before any user logs on. It makes a sevice that runs

%systemroot%/system32/AUTOEXNT.BAT See

http://www.ss64.com/ntsyntax/autoexec.html

Posted

Re: Running batch files before Windows loads

 

 

Many thanks. Just the job!

 

After a long search, found somewhere to download from, as not on any of my

w2kpro or server CDs in the tool kit.

 

Anyway, will try to set up tomorrow.

 

Assume, unless told otherwise, should be like a DOS batch file

 

rgds

Somerset

UK

Posted

Re: Running batch files before Windows loads

 

OOOppppppssss

Sorry, more questions!

 

Have run the set up and installed the batch file etc. etc. as per the

microsoft instructions.

 

Problem. Seems to run AFTER login.

 

WIn2k pro machine. Autolog in as administrator using Tweak.

 

First run, Zonealarm firewall trapped it, so ran AFTER ZA loaded, after log

in.

 

Stopped ZA but still runs after log in.

 

As trying to delete all index.dat files, obviously won't delete them once

Windows running.

 

Any other ideas? Like to run in boot process (when windows sometimes checks

for hard disk errors)? Lines in autoexnt.bat are simple like erase

\I:\cache\index.dat /q/f

sorry to be a pain, but must be able to be done somehow.....or am I missing

something in the install of autoexnt?

 

p.s. loaded task scheduler. Same problem. won't delete index files as

starts too late!

Guest Pegasus \(MVP\)
Posted

Re: Running batch files before Windows loads

 

 

"JR" <JR@discussions.microsoft.com> wrote in message

news:DD7C04D7-7259-4599-A6E9-4A8CB57DE53F@microsoft.com...

> OOOppppppssss

> Sorry, more questions!

>

> Have run the set up and installed the batch file etc. etc. as per the

> microsoft instructions.

>

> Problem. Seems to run AFTER login.

>

> WIn2k pro machine. Autolog in as administrator using Tweak.

>

> First run, Zonealarm firewall trapped it, so ran AFTER ZA loaded, after

> log

> in.

>

> Stopped ZA but still runs after log in.

>

> As trying to delete all index.dat files, obviously won't delete them once

> Windows running.

>

> Any other ideas? Like to run in boot process (when windows sometimes

> checks

> for hard disk errors)? Lines in autoexnt.bat are simple like erase

> \I:\cache\index.dat /q/f

> sorry to be a pain, but must be able to be done somehow.....or am I

> missing

> something in the install of autoexnt?

>

> p.s. loaded task scheduler. Same problem. won't delete index files as

> starts too late!

 

You may have to use pendmoves and movefile:

http://www.microsoft.com/technet/sysinternals/FileAndDisk/pendmoves.mspx


×
×
  • Create New...