| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 6:28 am Post subject: xp pro and dos question |
|
|
hello all
i'am trying to make a autoexec.bat file for xp pro however it seems to me that it don't like bat files
what i'am trying to do is when the pc boots up before it starts windows i want it to run a autoexec.bat file that will del a program that is in the c:\test\junk.exe with out having to hit the "y" key like the in 98 i would just added a line in the autoexec.bat file like
deltree /y
how can i do this in xp pro?
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Feb 10, 2005 6:52 am Post subject: |
|
|
>>
| Code: |
@ECHO OFF
DEL c:\test\junk.exe /F
|
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Feb 10, 2005 8:09 am Post subject: |
|
|
I don't think you can do this, since Windows XP doesn't have DOS in it anymore. The commandprompt like you can start with "cmd.exe" is just an emulator which provides you a DOS-like enviorment. Can't you delete the program another way, like by starting a small VDS EXE as a Windows service?  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Feb 10, 2005 8:51 am Post subject: |
|
|
My DiskNMem.DLL has a DelOnReboot function which could be an easy way of doing it.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 2:06 pm Post subject: |
|
|
no i have to del it in dos if its possible....there has to be a way
i hope  _________________ Have a nice day  |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 10, 2005 3:06 pm Post subject: |
|
|
Why don't you make a .BAT file from PGWARE's code above and then put it in the Windows Startup folder? Do you have to run it before windows starts for some particular reason? _________________ Joe Floyd |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 3:42 pm Post subject: |
|
|
yes i have to del this file before windows loads other wise it will say file in uses
this program is not a vds program  _________________ Have a nice day  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Feb 10, 2005 4:48 pm Post subject: |
|
|
Well that means the program is started somehow, you can delete it's Windows registry (probably in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run) or it's cooresponding HKEY_CURRENT_USER key.
Also check the windows Start-Up folder, and the RunOnce registry keys. You may also want to check the win.ini, system.ini files to see if there are any startup files there.
Just remove the entry and the file won't start up on Windows. You can then delete the file. |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 5:06 pm Post subject: |
|
|
yea i tried all that it still loads
that is why i have to do it in autoexec.bat type of file ..... i'am not sure where else its hiding to make it start when windows loads...the s/w is loaded on a 98 machine and del the file before it loads windows sovled the problem but as you know 98 and xp are not the same  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 6:59 pm Post subject: |
|
|
can someone that is on xp check something for me? ( i don't have aceess to xp right now out of town)
do a file find for this
Autoexec.nt
i think it will be in the system/32 folder
if its there please tell me what is in there
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Thu Feb 10, 2005 7:17 pm Post subject: |
|
|
I've seen some scripts placed in the following areas that would start programs at startup/logon:
C:\WINDOWS\system32\grouppolicy\user\scripts\logon
C:\WINDOWS\system32\grouppolicy\machine\scripts\startup
You might also want to look in these spots for scripts that will setup programs to run in the runonce reg keys when you logoff/shutdown:
C:\WINDOWS\system32\grouppolicy\user\scripts\logoff
C:\WINDOWS\system32\grouppolicy\machine\scripts\shutdown
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Feb 10, 2005 7:18 pm Post subject: |
|
|
Here is the exact contents of that file (Im running XP Home:
| Code: |
@echo off
REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.
REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe
REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir
REM Install DPMI support
lh %SystemRoot%\system32\dosx
REM The following line enables Sound Blaster 2.0 support on NTVDM.
REM The command for setting the BLASTER environment is as follows:
REM SET BLASTER=A220 I5 D1 P330
REM where:
REM A specifies the sound blaster's base I/O port
REM I specifies the interrupt request line
REM D specifies the 8-bit DMA channel
REM P specifies the MPU-401 base I/O port
REM T specifies the type of sound blaster card
REM 1 - Sound Blaster 1.5
REM 2 - Sound Blaster Pro I
REM 3 - Sound Blaster 2.0
REM 4 - Sound Blaster Pro II
REM 6 - SOund Blaster 16/AWE 32/32/64
REM
REM The default value is A220 I5 D1 T3 and P330. If any of the switches is
REM left unspecified, the default value will be used. (NOTE, since all the
REM ports are virtualized, the information provided here does not have to
REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.
REM The T switch must be set to 3, if specified.
SET BLASTER=A220 I5 D1 P330 T3
REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid
REM SB base I/O port address. For example:
REM SET BLASTER=A0
|
|
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Thu Feb 10, 2005 7:32 pm Post subject: |
|
|
The AUTOEXEC.NT is what windows uses to when a cmd.exe session is started...
I believe this is the default shipped with all versions of XP:
| Code: | @echo off
REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.
REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe
REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir
REM Install DPMI support
lh %SystemRoot%\system32\dosx
REM The following line enables Sound Blaster 2.0 support on NTVDM.
REM The command for setting the BLASTER environment is as follows:
REM SET BLASTER=A220 I5 D1 P330
REM where:
REM A specifies the sound blaster's base I/O port
REM I specifies the interrupt request line
REM D specifies the 8-bit DMA channel
REM P specifies the MPU-401 base I/O port
REM T specifies the type of sound blaster card
REM 1 - Sound Blaster 1.5
REM 2 - Sound Blaster Pro I
REM 3 - Sound Blaster 2.0
REM 4 - Sound Blaster Pro II
REM 6 - SOund Blaster 16/AWE 32/32/64
REM
REM The default value is A220 I5 D1 T3 and P330. If any of the switches is
REM left unspecified, the default value will be used. (NOTE, since all the
REM ports are virtualized, the information provided here does not have to
REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.
REM The T switch must be set to 3, if specified.
SET BLASTER=A220 I5 D1 P330 T3
REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid
REM SB base I/O port address. For example:
REM SET BLASTER=A0
|
I accually got this from my XP embedded repository... (I develop XP Embedded images at my place of employment)
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 7:42 pm Post subject: |
|
|
| Quote: |
The AUTOEXEC.NT is what windows uses to when a cmd.exe session is started...
|
so that don't start when pc is booted up? you have to start a cmd.exe session?
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Thu Feb 10, 2005 7:46 pm Post subject: |
|
|
why would there be a sound blaster setting? i mean if you have to start a cmd.exe session you sure would want that sound blaster config before you would load windows....
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
|