Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoExec.bat? (WinXP/SP2)

    How can I reclaim my DOS BATCH files in WinXP?


    <font color=red>This is the "kicking and screaming" part of "He was dragged, kicking and screaming into Windows XP".</font color=red>

    To date (Win3.x, Win95, Win98) I have based a large part of my machine maintenance on DOS Batch files. Some examples from my
    daily use:

    1) A batch file that invokes PKZip2.5 to archive the existing System.dat, User.dat before loading the Graphical Interface of
    Windows (WIN.COM). I am able to maintain an audit trail of the registry, and can easily recover after a regrettable installation of software.

    2) A batch file that detects a second drive during the first boot of the day, before WIN.COM, and calls XCOPY32 to copy new
    and updated files to that second drive. I am able to maintain an instantly-available bootable drive during business hours. OK, not
    instantaneous, but two minutes away.

    3) Batch files that effect unattended runs of drive maintenance routines such as ScanDisk, Defrag, and so on.

    4) Batch files that secure Normal.dot before laoding WinWord.exe.

    Many, many more.


    In Windows XP I have found that my AutoExec.BAT appears to be ignored, although I spotted the post that suggested TweakUI-XP
    would allow me to parse the autoexec.bat (after I'd d/l and installed SP2, it appears)

    Most of the utilities in my C:Utils folder appear to behave at the command prompt.

    My first requirement seems to be to effect the actions that used to take place at the command prompt BEFORE WIN.COM runs; I
    have historically had three batch files:
    a) Autoexec.bat - regular boot sequence which invokes
    [img]/forums/images/smilies/cool.gif[/img] AutoDOS.BAT - does pre-WIN maintenance then invokes WIN.COM whose startup folder contains
    c) AutoWin.BAT - which effects all regular operations that can safely take place within the windows environment.

    Question: Am I likely to be able to run an AutoExec.BAT in the manner with which I am accustomed?


    My current line of reasoning is that my pre-WIN batch processing is the essential hurdle. The batch files that ran in Win98/Startup are presumed to be as effective (with appropriate path modifications) in WinXP/Startup, since the underlying *.COM utilities appear to be well-behaved.

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    You can define scripts that run when you logon in Group Policy.

    Start > Run > GPEDIT.MSC
    User Configurarion > Windows Settings > Scripts (Logon/Logoff)
    Double click Logon
    Add...
    etc.

    Similarly you can define a script that runs at Startup in
    Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)

    Would this do what you want?

    StuartR

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    > Start > Run > GPEDIT.MSC

    Another interesting area of exploration (sigh and grin).

    At first essay (I got it to load Word97 at re-boot) it appears to be a glorified rendition of the Startup folder of Win95/98. That would give me more programmed control over what happens automatically when/while/after Windows XP is loading and starting, but it doesn't resolve the problem of "taking care of business on the hard drives BEFORE the gui takes over.

    (FWIW I just went looking to see if we still had a system.dat & user.dat, but can't see it. Possibly hidden from my beady little eyes ....)

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    If you just want to back up essential system files then all you need to do is make sure that System Restore is enabled. (Control Panel > System > System Restore)

    StuartR

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    > If you just want to back up essential system files

    More than that; I suspect that microsoft is gradually gathering "utilities" into its bosom, but I like a tad more control.

    One example is my four-state check at boot up:
    a) Is it first boot of the day, or not?
    [img]/forums/images/smilies/cool.gif[/img] has a backup been made or not?

    I perform a variety of different tasks according to the four combinations.


    There is a background of feeling in my original post - I detest so-caleld "advances in technology" that strip us of our ability to continue to perform existing tasks. In crude terms, I don't like Bill gates deciding that i shouldn't be able to use my PC as a DOS machine prior to launching Windows. Who is he to say that I should abandon a functioning DOS utility that provides a service for me at the start of day? I don't want to sound bitter about this, but .....


    The answer to this thread appears to be "You can't do DOS prior to Windows on an XP machine".

  6. #6
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,592
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    For some of your batch files:
    1.) The registry structure with XP is dramatically different than the 9x base. Here's an article on XP System Restore. If that does not meet your needs check out ERUNT.
    2.) Not sure. Have to check some more.
    3.) Check out the disk cleanup wizard under Start | All programs | Accessories | System Tools | Disk Cleanup. I think you can schedule various cleanup activities there. For disk tools just right click the dirve and select Properties | Tools. Defrag can be run any time your system is booted. XP is much more forgiving about that. If you want a boot time defrag you'll have to look into a third party solution. Whenever you run error checking which is ChkDsk (the XP ScanDisk) if the drive can not be locked XP will ask if you want to run at the next boot.
    4.) If you are concerned about Normal.dot - make a copy with Windows Explorer or make it read only.

    If you have not installed SP-2, I'd strongly suggest that you back up your system and install it.

    Last for now, you are NOT likely to be able to do anything like what you want in an Autoexec.bat. The description if TweakUI states the file will be scanned for SET commands and variables found will be set in the USER environment.

    Joe
    Joe

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    Joe, thanks for the resposne.

    Based on my limited (three days) examination of WinXP I am reasonably confident that batch files that ran under Win95/98 will run, perhaps with slight modifications, under WinXP.

    At issue for me is not "batch processes running under windows", but "batch processes running before windows loads".

    My latest response to Stuart phrased it in a way I wished I'd first phrased it - I'd like to continue using the machine as a DOS machine immediately prior to the boot. Autoexec.bat is merely a classic example of such a task; for example, if I have a well-functioning Lotus-123 worksheet that needs to be addressed at the start of each week day, why should I not continue to use my computer for that purpose?

    Microsoft's variety of system maintenance tools are just that - tools for maintaining Microsoft Windows; they don't begin to address some of the data that I might reasonably expect in my own domain.

    I am not trying to get into a MS-bashing mood here; I'm frustrated at the apparent withdrawl of a perfectly good part of the computer system.

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    Chris,

    This just can't be done.

    Windows 9x was a layer on top of a DOS machine - so you could do what you have described.

    Windows XP does not have a DOS machine running under it, the hardware is directly controlled by Windows. The command window is a layer running on top of windows and can't be used until windows is running.

    If you have formatted your disks as FAT then you could boot from a Windows 98 startup disk and make changes to files on the disk. If you are using NTFS then this is much more difficult - you would need a third party tool that knows how to access NTFS partitions.

    StuartR

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    > This just can't be done.

    Stuart, thanks for confirming my (worst) fears.

    I suspect now that this was a inhibition two or three years ago when first I received a copy of XP - at that time I didn't have a need for it, tested it, found that my boot sequence was inoperative, and returned to Win9x.


    Still, I suppose that now I have a new challenge.

    I'm in the process of testing my startup routines that do run under a Win-DOS window.

    Thanks to your confirmation I won't be spending hours searching for an alternate answer!

  10. #10
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,592
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    While you may be able to get those batch files to work you really need to investigate XP in depth. Many things are dramtically different that in the 9x world. As Stuart mentioned DOS does not exist with XP. There is a command shell that gives you access to similar commands.

    Joe
    Joe

  11. #11
    Silver Lounger
    Join Date
    Aug 2001
    Location
    Canton, Ohio, USA
    Posts
    1,716
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: AutoExec.bat? (WinXP/SP2)

    Joe,

    I followed your link to System Restore and read this quote,[b]
    H Lewton

  12. #12
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,592
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    Every XP machine I've checked has restore points named 'System Checkpoint' every 24 - 26 hours. Are you sure you haven't disabled System Restore? Are there other restore points? Note also that the periodic restore points are only created during system idle time that is when there is no mouse, keyboard or disk i/o activity.

    Joe
    Joe

  13. #13
    Silver Lounger
    Join Date
    Aug 2001
    Location
    Canton, Ohio, USA
    Posts
    1,716
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: AutoExec.bat? (WinXP/SP2)

    Joe,

    My System Restore is active. Today is Dec. 1st and the last restore point I have was created on Nov. 29th. My machine stays on most all the time.

    Thanks.
    H Lewton

  14. #14
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    > Would this do what you want?

    It might. I'll just have to remember not to play around with TweakUI and inadvertently turn myself from "Chris Greaves" into "Administrator" with the attendant "Aaaaaargh! I've lost all my settings, shortcuts, reason for living ..." etc. etc. etc.

    I am (once more!) being logged on automatically as the sole user "Chris Greaves".

    My Startup Scripts, in both the Computer and the User Configuration look like the attached..

    The batch file is: <pre>PATH "$1";"$path$"</pre>


    Once I had rebooted, and opened up a CMD window, I expected to see that my PATH had been augmented with "C:BAT" and "C:UTIL",
    but it shows only
    <pre>PATH=C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSys tem32Wbem C:WINDOWSsystem32</pre>


    Have I misunderstood something here?

    I figured that since I am the sole user, I may as well put startup batch files into the "Computer Configuration" area; when that didn't appear to work I added them to "User Configuration", figuring that once something worked I'd remove the other one.

  15. #15
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: AutoExec.bat? (WinXP/SP2)

    The correct method for changing your path on Windows XP is

    Control Panel > System > Advanced > Environmental Variables > Path > Edit

    StuartR

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •