msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there a difference in Dir Function in Vista

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
Roger Stenson



Joined: 04 Oct 2007
Posts: 4

PostPosted: Wed May 02, 2007 2:43 am    Post subject: Is there a difference in Dir Function in Vista Reply with quote

Hi all
I am trying to decide whether I am executing in Vista or not and have
included the followint test
As far as I can see the quoted file is Unique to Vista
Whilst I will be delighted to accept advice on how better to execute this
test I would also like some help on why the test in the code below fails. I
can see the file in the quoted path

Roger Stenson

If Len(Dir("C:\BOOTSECT.BAK", vbDirectory)) Then

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Tue May 01, 2007 8:18 pm    Post subject: Re: Is there a difference in Dir Function in Vista Reply with quote

"Roger Stenson" wrote in message $2i.1914@newsfe4-gui.ntli.net...
> Hi all
> I am trying to decide whether I am executing in Vista or not and have
> included the followint test
> As far as I can see the quoted file is Unique to Vista
> Whilst I will be delighted to accept advice on how better to execute this
> test I would also like some help on why the test in the code below fails.
> I can see the file in the quoted path
>
> Roger Stenson
>
> If Len(Dir("C:\BOOTSECT.BAK", vbDirectory)) Then

It may be failing due to access restrictions; a better option would be to
call the GetVersionEx API and look for major version 6
Back to top
View user's profile Send private message
Roger Stenson



Joined: 04 Oct 2007
Posts: 4

PostPosted: Wed May 09, 2007 1:25 am    Post subject: Re: Is there a difference in Dir Function in Vista Reply with quote

HI all
Sorry for the delay in thanking your for your advice. I have been away for
the bank holiday weekend.It worked perfectly and I am extremely grateful
Roger Stenson
"Bob Butler" wrote in message %23pgVcEjHHA.1884@TK2MSFTNGP06.phx.gbl...
> "Roger Stenson" wrote in message
> $2i.1914@newsfe4-gui.ntli.net...
>> Hi all
>> I am trying to decide whether I am executing in Vista or not and have
>> included the followint test
>> As far as I can see the quoted file is Unique to Vista
>> Whilst I will be delighted to accept advice on how better to execute
>> this test I would also like some help on why the test in the code below
>> fails. I can see the file in the quoted path
>>
>> Roger Stenson
>>
>> If Len(Dir("C:\BOOTSECT.BAK", vbDirectory)) Then
>
> It may be failing due to access restrictions; a better option would be to
> call the GetVersionEx API and look for major version 6
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
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


Powered by phpBB © 2001, 2005 phpBB Group