|
#1
|
||||
|
||||
|
Function: IsRunningOnTabletPC
Last Revision: September 17, 2004 (001) Information This function can be used to determine if the host operating system is running Window XP Tablet PC Edition. To use this function in your Setup Factory 7.0 projects, simply copy and paste it into your Global Functions. You can get there by selecting Resources > Global Functions from the main menu. Code:
function IsRunningOnTabletPC() local strRet = DLL.CallFunction(_SystemFolder.."\\user32.dll","GetSystemMetrics",86,DLL_RETURN_TYPE_INTEGER,DLL_CALL_STDCALL); local nLastError = Application.GetLastError(); if(nLastError == 0) then if(strRet ~= "0") then return true; end end return false; end Code:
if (IsRunningOnTabletPC()) then
Dialog.Message("Status","This system is running Windows XP Tablet PC Edition");
else
Dialog.Message("Status","This system is NOT running Windows XP Tablet PC Edition");
end
Type: Setup Factory 7.0 Function Created By: Brett Kapilik Comments? Please post them here. |
|
#2
|
|||
|
|||
|
Here is a small modification to Brett's Code,
it allows for additional Os version detection: "Windows XP Media Center Edition" "Windows Server 2003 - Revision 2" Code:
function IsRunningOnTargetPC(ntype)
local strRet = DLL.CallFunction(_SystemFolder.."\\user32.dll","GetSystemMetrics",ntype,DLL_RETURN_TYPE_INTEGER,DLL_CALL_STDCALL);
local nLastError = Application.GetLastError();
if(nLastError == 0) then
if(strRet ~= "0") then
return true;
end
end
return false;
end
--[[Set your additional Os targets to detect(uncomment only, your target OS code line)]]
local ntype = 86; local strOs = "Windows XP Tablet PC Edition";
--local ntype = 87; local strOs = "Windows XP Media Center Edition";
--local ntype = 89; local strOs = "Windows Server 2003 - Revision 2";
if (IsRunningOnTargetPC(ntype)) then
Dialog.Message("Status","This system is running "..strOs);
else
Dialog.Message("Status","This system is NOT running "..strOs);
end
|
|
#3
|
|||
|
|||
|
Caution: testing at my end on Vista Beta 2(ultimate edition),
if you apply tests for: --local ntype = 86; local strOs = "Windows XP Tablet PC Edition"; --local ntype = 87; local strOs = "Windows XP Media Center Edition"; you will find that results are 'true' for vista - ultimate edition as functionality for both is imbedded for vista -ultimate just a heads up for now, if developing for NT6 |
|
#4
|
|||
|
|||
|
Thanks for the example Ted!
On a side note, has anyone got a list of all the known values for 'ntype' and their associated operating system string values? |
|
#5
|
|||
|
|||
|
Correction for applying tests on Vista - Ultimate.
"Tablet Pc Edition" is Not returned true for this Os, however the below has been reverified: if you apply a test for: --local ntype = 87; local strOs = "Windows XP Media Center Edition"; you will find that result is returned 'true' for Vista - Ultimate edition as functionality for Media Center is imbedded for vista -ultimate just a heads up for now, if developing for NT6 |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bizarre Callback Function Behaviour - Can anyone help? | SRJ | AutoPlay Media Studio 5.0 | 3 | 06-30-2004 10:16 PM |
| Function: Validate the Contents of an Input Object | Lorne | AutoPlay Media Studio 5.0 Examples | 2 | 06-17-2004 09:47 AM |
| Function: Test Whether An Input Object Is Empty | Lorne | AutoPlay Media Studio 5.0 Examples | 0 | 06-08-2004 03:18 PM |
| Function: Increase/Decrease Audio Playback Volume | Adam | AutoPlay Media Studio 5.0 Examples | 0 | 05-31-2004 03:28 PM |
| Function: Resize & Center an Image | kpsmith | AutoPlay Media Studio 5.0 Examples | 0 | 05-17-2004 02:36 PM |
All times are GMT -6. The time now is 02:50 AM.








Linear Mode

