Working Directories under VB 
Author Message
 Working Directories under VB

Help !!

Is there a way to specify the working directory of an application run by a
shell in VB?

If you create a new item under progman, you input a description, a command
line and a working directory. How is this working directory used? And can I
simulate this under VB?

Cheers in advance.

&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
&*                                                                         *&

&*    (James Herrieven)                                                    *&
&*                                                                         *&
&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&



Tue, 08 Jul 1997 17:44:22 GMT  
 Working Directories under VB

Quote:

>Is there a way to specify the working directory of an application run by a
>shell in VB?
>If you create a new item under progman, you input a description, a command
>line and a working directory. How is this working directory used? And can I
>simulate this under VB?

If you use shellexecute you can stipulate a working directory.

------------------------------------------------------------------------
Chuck Stuart
Mesquite TX USA
Contract Programmer.
Author of VBTrace, runtime VB Trace/Profile/XRef utility.
------------------------------------------------------------------------



Tue, 08 Jul 1997 21:17:13 GMT  
 Working Directories under VB


  >Is there a way to specify the working directory of an application run by a
  >shell in VB?

    CHDIR before you shell....

___
* UniQWK #50  * Pennsylvania: Constructionwealth of Pennsylvania

Chad Z. Hower
Phoenix Business Enterprises
'[1;35;40m-=> Delphi Internet Jet SST v3.001A (Alpha) - (C) PBE



Fri, 11 Jul 1997 07:14:22 GMT  
 Working Directories under VB

Quote:

>Is there a way to specify the working directory of an application run by a
>shell in VB?
>If you create a new item under progman, you input a description, a command
>line and a working directory. How is this working directory used? And can I
>simulate this under VB?

The working directory becomes the default for any file accesses which
specify a relative path only. For most apps, it would also become the
default directory when a file open or file save as common dialog box is
opened.

To specifiy the working directory, you should be able to ChDir to the
specified directory before launching the app. If you want to then revert
to your previous directory you should store the value of CurDir in a vbl
beforehand and then ChDir back to it afterwards.

--
Luke Webber

* Note: The opinions expressed by Luke Webber are in no way supported *
*       by his employers, Luke Webber Consulting Services             *



Sat, 12 Jul 1997 06:46:54 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Working directory from a VB program

2. Changing the working directory of programs from VB (?)

3. need vb script to change users home directory in on fell swoop (active directory)

4. Ole Directory Services (Active Directory Services) 1.1 - Has any body managed to use the VB examples

5. Shell (start xxxxx) not working for full Windows-path directory files (works for 8-character directory paths)

6. How to set working directory at runtime?

7. Current working directory for Excel

8. HasAccess and directories doesn't work

9. looking / storing working directory

10. Working Directory

11. Checking for directories not quite working right

12. Uptain working directories?

 

 
Powered by phpBB® Forum Software