PDA

View Full Version : Sorry quick question Boolean


slafta
06-04-2005, 08:26 AM
if I execute:

resultNETframworkv10 = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\.NETFramework\\PendingUpdat es\\v1.0");

assume it is true

if (resultNETframworkv10 == true) then
output = Dialog.Message("output", "message", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

how would you recommend construct a boolean compare?

Intrigued
06-04-2005, 09:52 AM
For what it's worth, I just posted a Boolean comparison example here:

http://www.indigorose.com/forums/showpost.php?p=56532&postcount=2

Bruce
06-04-2005, 07:59 PM
I believe it's
if (resultNETframworkv10) then
output = Dialog.Message("output", "message", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

slafta
06-05-2005, 01:37 AM
--////////////////////////////////////.net search routine//////////////////////////////////////////////////////
scroutput = Dialog.Message("Initalizing .NET search routine", "click ok to continue, please write down the versions prompted, all unsupported versions will have to be removed", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////
--main method pending update in .NET folder
resultNETframworkv10 = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\.NETFramework\\PendingUpdat es\\v1.0");
resultNETframworkv103705 = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\.NETFramework\\PendingUpdat es\\v1.0.3705");
resultNETframworkv114322 = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\.NETFramework\\PendingUpdat es\\v1.1.4322");
-----adding support for ASP v2.0.40607 Beta
resultNETframworkv2040607 = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\.NETFramework\\PendingUpdat es\\v2.0.40607");
--///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
--alternate method through ASP .net fodler
resultNETframworkv103705confirm288BUILD = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\ASP.NET\\1.0.3705.288");
resultNETframworkv103705confirm6018BUILD = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\ASP.NET\\1.0.3705.6018");
resultNETframworkv114322confirm4322BUILD = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\ASP.NET\\1.1.4322.0");
-----adding support for ASP v2.0.40607 Beta
resultNETframworkv2040607confirmBETABUILD = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Microsoft\\ASP.NET\\2.0.40607.0");
--?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ???????
--returns boolean
-----------------------------------------------------------------------------------------------------------
if (resultNETframworkv10 or resultNETframworkv103705 or resultNETframworkv114322 or resultNETframworkv2040607)then
--/////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\BUILD beta 6/2005\\\\\\\\\\\\\\\\\\\\\\\\\\///
if (resultNETframworkv2040607confirmBETABUILD and resultNETframworkv2040607 )then
output = Dialog.Message("Version of .Net Software", "You have Version 2.0.4.0607 Build Beta installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a INCOMPATIBLE version installed.. 1.0.3705 is currently only supported, please uninstall any unsupported version to maximize operation of this module.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
--/////\\\\\\\\\\\\\\Display .NET verion 2.0.4.0607 installed////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (resultNETframworkv2040607 or resultNETframworkv2040607confirmBETABUILD)then
output = Dialog.Message("Version of .Net Software", "You have Version 2.0.4.0607 Build Unknown installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a INCOMPATIBLE version installed.. 1.0.3705 is currently only supported, please uninstall any unsupported version to maximize operation of this module.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end
--/////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\BUILD 4322\\\\\\\\\\\\\\\\\\\\\\\\\\///
if (resultNETframworkv114322confirm4322BUILD and resultNETframworkv114322)then
output = Dialog.Message("Version of .Net Software", "You have Version 1.1.4.322 Build 4322 installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a INCOMPATIBLE version installed.. 1.0.3705 is currently only supported, please uninstall any unsupported version to maximize operation of this module.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
--/////\\\\\\\\\\\\\\Display .NET verion 1.1.4322 installed////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (resultNETframworkv114322)then
output = Dialog.Message("Version of .Net Software", "You have Version 1.1.4.322 Build Unknown installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a INCOMPATIBLE version installed.. 1.0.3705 is currently only supported, please uninstall any unsupported version to maximize operation of this module.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end

--/////\\\\\\\\\\\\\\Display .NET verion 1.0.3705 installed build 6018////////////////\\\\\\\\\\\\\\\\
if (resultNETframworkv103705confirm6018BUILD and resultNETframworkv103705)then
output = Dialog.Message("Version of .Net Software", "You have Version 1.0.3705 Build 6018 installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a compatible version installed.. 1.0.3705 build 6018", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
--//////////////////////Display .NET verion 1.0.3705 installed BUILD 288\\\\\\\\\\\\\\\\\\\\\\\\\\///
if (resultNETframworkv103705confirm288BUILD and resultNETframworkv103705)then
output = Dialog.Message("Version of .Net Software", "You have Version 1.0.3705 Build 288 installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a compatible version installed.. 1.0.3705 build 288", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
--/////\\\\\\\\\\\\\\Display .NET verion 1.0.3705 installed////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (resultNETframworkv103705)then
output = Dialog.Message("Version of .Net Software", "You have Version 1.0.3705 installed ", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
output = Dialog.Message("Version of .Net Software", "You have a compatible version installed.. 1.0.3705 unknown build", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end
end
--?????????????????????????????????????????????????? ?????????????????????????????????????????????????
--/////\\\\\\\\\\\\\\Display .NET verion 1.0 installed////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (resultNETframworkv10) then
output = Dialog.Message("Version of .Net Software", "You have Version 1.0 installed if this is the only popup please upgrade to support Version 1.0.3705", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
--?????????????????????????????????????????????????? ?????????????????????????????????????????????????
else
output = Dialog.Message("Version of .Net Software", "You have no version of .NET framework installed if this is the only popup please upgrade to support Version 1.0.3705", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////
--/////////////////////////////tested good in live environment 6/5/2005 ///////////////////////////////////////
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////