PC Review


Reply
Thread Tools Rate Thread

chkdsk 'ing partitions on startup

 
 
Rob
Guest
Posts: n/a
 
      1st May 2007
Hi all

How do I get WinXP to execute a batch file during startup? I have about a
dozen partitions on this system, and going through each partitions
properties to get a chkdsk done at next reboot is tedious: having a batch
file that can be selectively run or not would be very handy, but I can't
figure out where to put it. Make the batch file then make a little reg file
to insert an entry into RunOnce?

I've also found that I can't install the command console because I've
already installed SP2, that would solve the above problem, if there's a way
to convince XP to just install the console.

Thanks for any advice
Rob


 
Reply With Quote
 
 
 
 
Wesley Vogel
Guest
Posts: n/a
 
      1st May 2007
> How do I get WinXP to execute a batch file during startup?

Place a shortcut to your bat file in either one of these folder...

%allusersprofile%\Start Menu\Programs\Startup
or
%userprofile%\Start Menu\Programs\Startup

Anything in %allusersprofile%\Start Menu\Programs\Startup will run for
whoever logs on.

Anything in %Userprofile%\Start Menu\Programs\Startup will run for whoever
%Userprofile% happens to be.

%userprofile% is an environment variable that is the path to the logged on
user's home folder.

Typing or pasting %userprofile% into the Start | Run box opens to the
Documents and Settings folder on whatever drive it is located on for the
logged in user.

I.e. C:\Documents and Settings\Your Name Here

Or pick a value name and the path to the bat file for the value data in one
of these...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
or
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Anything in HKEY_LOCAL_MACHINE is machine wide. It doesn't matter who logs
on.

Anything in HKEY_CURRENT_USER relates to the current user that is logged on.

I have these two bat files that run at boot.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Value Name: My Indexdat Killer
Data Type: REG_SZ
Value Data: C:\run.bat

Value Name: Mygetridofstuff
Data Type: REG_SZ
Value Data: "C:\Documents and Settings\Wesley Vogel\My Documents\COMPUTER
DOCUMENTS\Batch Files\Experimental Batch Files\Mygetridofstuff.bat"

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:(E-Mail Removed),
Rob <okami1dotwestnetdotcom.au> hunted and pecked:
> Hi all
>
> How do I get WinXP to execute a batch file during startup? I have about a
> dozen partitions on this system, and going through each partitions
> properties to get a chkdsk done at next reboot is tedious: having a batch
> file that can be selectively run or not would be very handy, but I can't
> figure out where to put it. Make the batch file then make a little reg
> file to insert an entry into RunOnce?
>
> I've also found that I can't install the command console because I've
> already installed SP2, that would solve the above problem, if there's a
> way to convince XP to just install the console.
>
> Thanks for any advice
> Rob


 
Reply With Quote
 
Rock
Guest
Posts: n/a
 
      1st May 2007
"Rob" <okami1dotwestnetdotcom.au> wrote in message
news:(E-Mail Removed)...
> Hi all
>
> How do I get WinXP to execute a batch file during startup? I have about a
> dozen partitions on this system, and going through each partitions
> properties to get a chkdsk done at next reboot is tedious: having a batch
> file that can be selectively run or not would be very handy, but I can't
> figure out where to put it. Make the batch file then make a little reg
> file to insert an entry into RunOnce?
>
> I've also found that I can't install the command console because I've
> already installed SP2, that would solve the above problem, if there's a
> way to convince XP to just install the console.


fsutil dirty query C:
Queries the status of the volumes dirty bit. When XP boots it calls
Autochk.exe to check the dirty bet. if it's set then Autochk initiates a
check of the disk with chkdsk /f.

You can set the dirty bit with this command:
fsutil dirty set C:

--
Rock [MS-MVP User/Shell]

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chkdsk won't scan any of my partitions Tim.T Windows XP General 3 23rd Jun 2007 04:00 PM
Chkdsk and defragment on multiple partitions? Kenny Windows XP Basics 0 17th Sep 2005 09:34 AM
ChkDsk on startup freezes (always do ChkDsk after standby)(laptop) neilsanner@yahoo.com Windows XP Help 6 24th May 2005 09:09 PM
ChkDsk on startup freezes (ChkDsk always after standby)(laptop) neilsanner@yahoo.com Windows XP Performance 0 19th May 2005 02:43 PM
Win XP MS-DOS Startup disk, Win 98SE Startup Disk, Boot Priority, chkdsk Alan C. Brown Windows XP General 12 8th May 2004 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:03 AM.