forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


xp pro and dos question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 6:28 am    Post subject: xp pro and dos question Reply with quote

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 Sad

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 Smile
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Feb 10, 2005 6:52 am    Post subject: Reply with quote

>>

Code:

@ECHO OFF
DEL c:\test\junk.exe /F
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Feb 10, 2005 8:09 am    Post subject: Reply with quote

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? Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Feb 10, 2005 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 2:06 pm    Post subject: Reply with quote

no i have to del it in dos if its possible....there has to be a way

i hope Smile

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu Feb 10, 2005 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 3:42 pm    Post subject: Reply with quote

yes i have to del this file before windows loads other wise it will say file in uses Sad

this program is not a vds program Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Feb 10, 2005 4:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 5:06 pm    Post subject: Reply with quote

yea i tried all that it still loads Sad

that is why i have to do it in autoexec.bat type of file Sad..... 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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 6:59 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Thu Feb 10, 2005 7:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Feb 10, 2005 7:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Thu Feb 10, 2005 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 7:42 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 10, 2005 7:46 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group