Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS AND SHELL!

Status
Not open for further replies.

thetambarineman

Technical User
Feb 29, 2000
63
GB
Hi,<br>once again i lookin for some help-<br>i want to use the shell to say for instance<br>change the dir,from the default (c:\windows) to c:<br><br>any ideas??<br><br>thanks fer your help<br><br>paul<br>
 
Use ChDrive to change the default drive and ChDir to change the default folder... or did you have a particular reason you wanted to use Shell?<br> <p> <br><a href=mailto: > </a><br><a href= temporary Vorpalcom home page</a><br>Send me suggestions or comments on my current software project.
 
Thanks for your reply-<br>In reply to your question:<br><br>&nbsp;&nbsp;&nbsp;i also want to call a program<br><br>what i thought was it would be the same as the shell ordinarily - i.e. - shell(&quot;&lt;pathname&gt; &lt;filename or text&quot;, vbmaximisedfocus)<br><br>so say I wanted to call the reg code in Windows 95:<br>&nbsp;&nbsp;attrib - etc<br><br>how would i do that???<br><br>Thanks once again.<br><br>Paul...<br><br>
 
Try:<br><br>InternalDOScmd$ = "attrib -h c:\msdos.sys"<br>Shell "c:\windows\command.com /c " & InternalDOScmd$<br><br>But if you want to get or set a file attribute you should use GetAttr and SetAttr. Almost all of the internal DOS commands have equivalents in VB. Some require a little coding but they all run cleaner and with less overhead than you would encounter by loading additional copies of the command processor.<br> <p> <br><a href=mailto: > </a><br><a href= temporary Vorpalcom home page</a><br>Send me suggestions or comments on my current software project.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top