I'm running a terminal server our users access through the default.htm in TSWeb. I'm trying to automatically load the ThinPrint activex component which provides remote printing. I'm able to get XP machines to load the component by using the code below in the "connect" section. However, I have Win9x clients that need to load another version of the client. Is there a way to test for the OS and load one cab file or the other? Here's the code that works for XP:
<!-- ================================= CONNECT ====================
-->
<div id=connectArea style="display: none">
<center>
<table>
<tr>
<OBJECT language="vbscript" ID="MsRdpClient"
onreadystatechange="OnControlLoad"
CLASSID="CLSID:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a"
CODEBASE="msrdp.cab#version=5,1,2600,2180"
WIDTH=<% resWidth = Request.QueryString("rW")
if resWidth < 200 or resWidth > 1600 then
resWidth = 800
end if
Response.Write resWidth %>
HEIGHT=<% resHeight = Request.QueryString("rH")
if resHeight < 200 or resHeight > 1200 then
resHeight = 600
end if
Response.Write resHeight %>>
<!=========Load ThinPrint client for XP>
</OBJECT>
<object align="right"
classid="clsid:42D683F7-9C1B-11D7-A860-005056C00001"
codebase="ThinPrint/XP/TPRDPenN.cab#version=-1,-1,-1,-1">
</object>
<!-- ================================= CONNECT ====================
-->
<div id=connectArea style="display: none">
<center>
<table>
<tr>
<OBJECT language="vbscript" ID="MsRdpClient"
onreadystatechange="OnControlLoad"
CLASSID="CLSID:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a"
CODEBASE="msrdp.cab#version=5,1,2600,2180"
WIDTH=<% resWidth = Request.QueryString("rW")
if resWidth < 200 or resWidth > 1600 then
resWidth = 800
end if
Response.Write resWidth %>
HEIGHT=<% resHeight = Request.QueryString("rH")
if resHeight < 200 or resHeight > 1200 then
resHeight = 600
end if
Response.Write resHeight %>>
<!=========Load ThinPrint client for XP>
</OBJECT>
<object align="right"
classid="clsid:42D683F7-9C1B-11D7-A860-005056C00001"
codebase="ThinPrint/XP/TPRDPenN.cab#version=-1,-1,-1,-1">
</object>