App.path is 8.3 or long? 
Author Message
 App.path is 8.3 or long?

Hi,

have anyone experinced this:
when using shell in VB, the pathname argument has to be 8.3 format BUT
app.path is long format.

In fact, I have several machines and several project where all kind of
behavior have been experinced (app.path in 8.3, shell crashing with long
pathname, etc..).

I think there is a place, either machine or project dependent, where
this can be configured but where?

Thanks.

Vince.



Sun, 09 Dec 2001 03:00:00 GMT  
 App.path is 8.3 or long?
Try putting the actual command line in double quotes.

rc = Shell ("c:\program files\myapp.exe", vbNormalFocus)  won't work

rc= Shell("""C:\Program Files\myapp.exe""", vbNormalFocus) should

This problem should cease to exist with newer service packs and Windows 2000

Dan Buskirk


Quote:
> Hi,

> have anyone experinced this:
> when using shell in VB, the pathname argument has to be 8.3 format BUT
> app.path is long format.

> In fact, I have several machines and several project where all kind of
> behavior have been experinced (app.path in 8.3, shell crashing with long
> pathname, etc..).

> I think there is a place, either machine or project dependent, where
> this can be configured but where?

> Thanks.

> Vince.



Sun, 09 Dec 2001 03:00:00 GMT  
 App.path is 8.3 or long?
If you place your Path\Filename.exe in a string varible it will work ok
Such as, which works for me.
Private Sub Form_Click()
Dim sPath As String
Dim nRtn As Long
    sPath = "d:\vb projects\dbdvoicechat\vchatapp
client_server\voicechat.exe"
    nRtn = Shell(sPath, vbNormalFocus)

End Sub

The way to fool some of these things dealing with Long Path problems is to
either put them into a string varible first or surround them with Chr$(34)
like Chr$(34) & yourpath & Chr$(34)..
Or you might have to play with different combo's of this...

Some food for thought...
HTH....

--

Have a good day.
Don

Quote:


>>Hi,

>>have anyone experinced this:
>>when using shell in VB, the pathname argument has to be 8.3 format BUT
>>app.path is long format.

>>In fact, I have several machines and several project where all kind of
>>behavior have been experinced (app.path in 8.3, shell crashing with long
>>pathname, etc..).

> There is an API function you can use to convert a long path name
> to a short one. This solves all sorts of problems (like with the
> "c:\Program Files" having a space in it). I can't recall its exact name
> or format but if you can't find it or get it to work (there are some
> tricks to watch out for) let me know and I'll dig out some code.

> Cheers, Russell Robinson



Sun, 09 Dec 2001 03:00:00 GMT  
 App.path is 8.3 or long?

Quote:

>Hi,

>have anyone experinced this:
>when using shell in VB, the pathname argument has to be 8.3 format BUT
>app.path is long format.

>In fact, I have several machines and several project where all kind of
>behavior have been experinced (app.path in 8.3, shell crashing with long
>pathname, etc..).

 There is an API function you can use to convert a long path name
 to a short one. This solves all sorts of problems (like with the
 "c:\Program Files" having a space in it). I can't recall its exact name
 or format but if you can't find it or get it to work (there are some
 tricks to watch out for) let me know and I'll dig out some code.

 Cheers, Russell Robinson



Mon, 10 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. App.path is 8.3 or long?

2. Help: App.Path returns 8.3 path in VB4/Win95

3. Getting DOS 8.3 path from Windows long file name

4. 8.3 file name to Long file name

5. HELP, I need to convert VB5 long filename back to DOS 8.3 format

6. VB Opening Long Name Project with 8.3

7. Convert Long Filenames to old 8.3 format

8. Convert long filenames to 8.3 format

9. API-Call to convert long filename to 8.3???

10. VB5 keeps changing long project name to 8.3

11. vb4: getting 8.3 filename from long file name

12. Convert Long File Name to 8.3 Notation

 

 
Powered by phpBB® Forum Software