XP and Shell (Cmd)??? 
Author Message
 XP and Shell (Cmd)???

With VB6, how can I 'shell' to a (argh) DOS shell?  XP has the CMD and no
shell!!!! (or at least, I've been unable to shell to a 'dos' shell).

What I want to do is to shell to a 'dos' shell... look to see IF any existing
plots file exists (ie: File.plt) and delete them... return from the shell and
carry on.

And while at it, how would I find out if a PC is Win98 or XP?  That way my
code 'could' use the Shell command if it was Win98...

Any help appreciated.

Bruce



Wed, 08 Sep 2004 12:50:33 GMT  
 XP and Shell (Cmd)???
Why bother to use Shell to something as simple as zapping a few files?
Quote:

>With VB6, how can I 'shell' to a (argh) DOS shell?  XP has the CMD and no
>shell!!!! (or at least, I've been unable to shell to a 'dos' shell).

>What I want to do is to shell to a 'dos' shell... look to see IF any existing
>plots file exists (ie: File.plt) and delete them... return from the shell and
>carry on.

>And while at it, how would I find out if a PC is Win98 or XP?  That way my
>code 'could' use the Shell command if it was Win98...

>Any help appreciated.

>Bruce



Wed, 08 Sep 2004 20:27:51 GMT  
 XP and Shell (Cmd)???

Quote:
>Use Environ("COMSPEC") & " /c " & your-DOS-command. This should
>use command.com on W9x and cmd.exe on NT (as long as NT is not
>configured to use command.com).

Thanks... I'll give it a shot!

Bruce



Thu, 09 Sep 2004 02:30:28 GMT  
 XP and Shell (Cmd)???
FYI, anything you do via the Win9x command-line interface, you can do via the NT/2K/XP CLI as well - with suitable allowances for different syntax and (usually) improved functionality.

If you are trying to use certain commands such as DELTREE, however, you will find that they are *not* available on NT platforms.  Use "rmdir" or "rm" instead.


:
: >Use Environ("COMSPEC") & " /c " & your-DOS-command. This should
: >use command.com on W9x and cmd.exe on NT (as long as NT is not
: >configured to use command.com).
:
: Thanks... I'll give it a shot!
:
: Bruce



Thu, 09 Sep 2004 05:10:19 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. On XP workstations, my access app get hung up using shell cmd to swap to Word

2. XP Cmd Command?

3. HELP: QBASIC SHELL CMD

4. CMD SHELLS & NTUSER.dat

5. URGENT: Help - Calling shell cmd and outputting to file

6. Shell cmd with long file names

7. VB & CMD Shell (in WinNT)

8. Shell Cmd & Screen Refresh

9. CMD SHELLS and NTUSER.dat

10. Shell cmd with long file names

11. Shell a CMD Line exe but at low priority

12. "shell" cmd - app starts minimized

 

 
Powered by phpBB® Forum Software