cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sachit1349
Level 4

using DOTNETSERVICEPACKINSTALLED with Is command

Hi,

Can anyone please tell me checking whether Service Pack 1 of .NET Framework 2.0 is installed or not...

I know that it can be done using Is command but still i am not able to do it

Is(DOTNETSERVICEPACKINSTALLED,REGDB_KEYPATH_DOTNET_20);

it returns a value -1.....
Can anyone suggest what is the mistake i am doing?

Thanks,
Sachit
Labels (1)
0 Kudos
(3) Replies
DebbieL
Level 17

When you're using the DOTNETSERVICEPACKINSTALLED constant, the second parameter should be in the following format:
Service Pack Number|.NET Version Registry Constant or Path

You need to include that pipe character (|).

So, I think you need to add the service pack number like this:
Is(DOTNETSERVICEPACKINSTALLED,1|REGDB_KEYPATH_DOTNET_20);
0 Kudos
DebbieL
Level 17

Sorry! I think I should have suggested this:

Is(DOTNETSERVICEPACKINSTALLED,"1|" + REGDB_KEYPATH_DOTNET_20);
0 Kudos
sachit1349
Level 4

thanks a lot.........
it worked...

Sachit
0 Kudos