RemoteApps


<% Whichfolder=server.mappath("rdp\") &"/" Dim fs, f, f1, fc set fs = CreateObject("Scripting.FileSystemObject") set f = fs.GetFolder(Whichfolder) set fc = f.files For Each f1 in fc if (LCase(Right(f1.name,4)) = ".rdp") then if not GetRDPvalue(f1,"full address:s:") = "" then appname = GetRDPvalue(f1,"remoteapplicationname:s:") basefilename = Left(f1.name,Len(f1.name) - 4) if appname = "" then appname = basefilename pngname = basefilename & ".png" set pngfs = CreateObject("Scripting.FileSystemObject") If pngfs.FileExists(server.mappath("png\" & pngname)) Then pngpath = "png/" & pngname Else pngpath = "rdpicon.png" End If Response.write "
" Response.write "
" & appname & "
" Response.write "
" end if end if Next function GetRDPvalue(f1,valuename) Err.Clear on error resume next Dim ts valuenamelen = Len(valuename) set ts = f1.OpenAsTextStream(1,-2) if Err.Number = 0 then Do While Not ts.AtEndOfStream Dim Line Line = ts.readline if (Lcase(Left(Line,valuenamelen)) = valuename) then theName = Right(Line,Len(Line)-valuenamelen) end if Loop theName = Replace(theName,"|","") GetRDPvalue = theName Else GetRDPvalue = "" end if on error goto 0 end function %>