diff --git a/README.md b/README.md index 58cceed..efa0309 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,16 @@ To setup RemoteApps, try [RemoteApp Tool](https://github.com/kimmknight/remoteap * Webfeed to put RemoteApps in client start menu * Optional authentication to provide different apps to different users * File type associations on webfeed clients +* Both ASP and ASP.NET (aspx) versions included (thanks surfchris) ## Download [Latest](https://github.com/kimmknight/raweb/archive/master.zip) -## Installation +## Quick installation -1. Install IIS and ASP features -2. Copy the contents of the "wwwroot" folder to your inetpub\wwwroot folder. +1. Install IIS and ASP features for Windows +2. Copy the contents of the "asp\wwwroot" folder to your inetpub\wwwroot folder. ## Guides diff --git a/wwwroot/Default.asp b/asp/wwwroot/Default.asp similarity index 100% rename from wwwroot/Default.asp rename to asp/wwwroot/Default.asp diff --git a/wwwroot/favicon.ico b/asp/wwwroot/favicon.ico similarity index 100% rename from wwwroot/favicon.ico rename to asp/wwwroot/favicon.ico diff --git a/wwwroot/icon/testapp.ico b/asp/wwwroot/icon/testapp.ico similarity index 100% rename from wwwroot/icon/testapp.ico rename to asp/wwwroot/icon/testapp.ico diff --git a/wwwroot/icon32/testapp.png b/asp/wwwroot/icon32/testapp.png similarity index 100% rename from wwwroot/icon32/testapp.png rename to asp/wwwroot/icon32/testapp.png diff --git a/wwwroot/png/testapp.png b/asp/wwwroot/png/testapp.png similarity index 100% rename from wwwroot/png/testapp.png rename to asp/wwwroot/png/testapp.png diff --git a/wwwroot/rdp/testapp.rdp b/asp/wwwroot/rdp/testapp.rdp similarity index 100% rename from wwwroot/rdp/testapp.rdp rename to asp/wwwroot/rdp/testapp.rdp diff --git a/wwwroot/rdpicon.png b/asp/wwwroot/rdpicon.png similarity index 100% rename from wwwroot/rdpicon.png rename to asp/wwwroot/rdpicon.png diff --git a/wwwroot/web.config b/asp/wwwroot/web.config similarity index 100% rename from wwwroot/web.config rename to asp/wwwroot/web.config diff --git a/wwwroot/webfeed.asp b/asp/wwwroot/webfeed.asp similarity index 100% rename from wwwroot/webfeed.asp rename to asp/wwwroot/webfeed.asp diff --git a/aspx/wwwroot/Default.aspx b/aspx/wwwroot/Default.aspx new file mode 100644 index 0000000..e016116 --- /dev/null +++ b/aspx/wwwroot/Default.aspx @@ -0,0 +1,103 @@ +<%@ Page language="C#" explicit="true" %> + + + + + +RAWeb - Remote Applications + + + + + +

RemoteApps


+<% + string appname = ""; + string basefilename = ""; + string pngname = ""; + string pngpath = ""; + + string Whichfolder = HttpContext.Current.Server.MapPath("rdp\\") + "/"; + string[] allfiles = System.IO.Directory.GetFiles(Whichfolder); + foreach(string eachfile in allfiles) + { + string extfile = eachfile.Substring(eachfile.Length - 4, 4); + if (extfile.ToLower() == ".rdp") + { + if (!(GetRDPvalue(eachfile,"full address:s:") == "")) + { + appname = GetRDPvalue(eachfile, "remoteapplicationname:s:"); + basefilename = eachfile.Substring(Whichfolder.Length, eachfile.Length - Whichfolder.Length - 4); + if (appname == "") + { + appname = basefilename; + } + pngname = basefilename + ".png"; + if (System.IO.File.Exists(HttpContext.Current.Server.MapPath("png\\" + pngname))) + { + pngpath = "png/" + pngname; + } + else + { + pngpath = "rdpicon.png"; + } + HttpContext.Current.Response.Write("
"); + HttpContext.Current.Response.Write("
" + appname + "
"); + HttpContext.Current.Response.Write("
"); + } + } + } +%> + + diff --git a/aspx/wwwroot/Web.config b/aspx/wwwroot/Web.config new file mode 100644 index 0000000..795ec19 --- /dev/null +++ b/aspx/wwwroot/Web.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/aspx/wwwroot/favicon.ico b/aspx/wwwroot/favicon.ico new file mode 100644 index 0000000..e989f75 Binary files /dev/null and b/aspx/wwwroot/favicon.ico differ diff --git a/aspx/wwwroot/icon/testapp.ico b/aspx/wwwroot/icon/testapp.ico new file mode 100644 index 0000000..379ecea Binary files /dev/null and b/aspx/wwwroot/icon/testapp.ico differ diff --git a/aspx/wwwroot/icon32/testapp.png b/aspx/wwwroot/icon32/testapp.png new file mode 100644 index 0000000..d5930a8 Binary files /dev/null and b/aspx/wwwroot/icon32/testapp.png differ diff --git a/aspx/wwwroot/png/testapp.png b/aspx/wwwroot/png/testapp.png new file mode 100644 index 0000000..80064d5 Binary files /dev/null and b/aspx/wwwroot/png/testapp.png differ diff --git a/aspx/wwwroot/rdp/testapp.rdp b/aspx/wwwroot/rdp/testapp.rdp new file mode 100644 index 0000000..d18eb37 --- /dev/null +++ b/aspx/wwwroot/rdp/testapp.rdp @@ -0,0 +1,50 @@ +redirectclipboard:i:1 +redirectposdevices:i:0 +redirectprinters:i:1 +redirectcomports:i:1 +redirectsmartcards:i:1 +devicestoredirect:s:* +drivestoredirect:s:* +redirectdrives:i:1 +session bpp:i:32 +prompt for credentials on client:i:1 +span monitors:i:1 +use multimon:i:1 +remoteapplicationmode:i:1 +server port:i:3389 +allow font smoothing:i:1 +promptcredentialonce:i:0 +authentication level:i:2 +full address:s:win7testbox +remoteapplicationprogram:s:||testapp +remoteapplicationname:s:Test Application +remoteapplicationcmdline:s: +alternate full address:s:win7testbox +disableremoteappcapscheck:i:1 +alternate shell:s:rdpinit.exe +screen mode id:i:2 +winposstr:s:0,3,0,0,800,600 +compression:i:1 +keyboardhook:i:2 +audiocapturemode:i:0 +videoplaybackmode:i:1 +connection type:i:2 +disable wallpaper:i:1 +allow desktop composition:i:1 +disable full window drag:i:1 +disable menu anims:i:1 +disable themes:i:0 +disable cursor setting:i:0 +bitmapcachepersistenable:i:1 +audiomode:i:0 +redirectdirectx:i:1 +autoreconnection enabled:i:1 +prompt for credentials:i:0 +negotiate security layer:i:1 +remoteapplicationicon:s: +shell working directory:s: +gatewayhostname:s: +gatewayusagemethod:i:4 +gatewaycredentialssource:i:4 +gatewayprofileusagemethod:i:0 +use redirection server name:i:0 diff --git a/aspx/wwwroot/rdpicon.png b/aspx/wwwroot/rdpicon.png new file mode 100644 index 0000000..a397547 Binary files /dev/null and b/aspx/wwwroot/rdpicon.png differ diff --git a/aspx/wwwroot/webfeed.aspx b/aspx/wwwroot/webfeed.aspx new file mode 100644 index 0000000..a9a3788 --- /dev/null +++ b/aspx/wwwroot/webfeed.aspx @@ -0,0 +1,117 @@ +<%@ Page language="C#" explicit="true" %> + +<% + string ServerName = System.Net.Dns.GetHostName(); + string datetime = DateTime.Now.Year.ToString() + "-" + (DateTime.Now.Month + 100).ToString().Substring(1, 2) + "-" + (DateTime.Now.Day + 100).ToString().Substring(1, 2) + "T" + (DateTime.Now.Hour + 100).ToString().Substring(1, 2) + ":" + (DateTime.Now.Minute + 100).ToString().Substring(1, 2) + ":" + (DateTime.Now.Second + 100).ToString().Substring(1, 2) + ".0Z"; + + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + + string Whichfolder = HttpContext.Current.Server.MapPath("rdp\\") + "/"; + string[] allfiles = System.IO.Directory.GetFiles(Whichfolder); + foreach (string eachfile in allfiles) + { + string extfile = eachfile.Substring(eachfile.Length - 4, 4); + if (extfile.ToLower() == ".rdp") + { + if (!(GetRDPvalue(eachfile, "full address:s:") == "")) + { + string basefilename = eachfile.Substring(Whichfolder.Length, eachfile.Length - Whichfolder.Length - 4); + string appalias = GetRDPvalue(eachfile, "remoteapplicationprogram:s:"); + string apptitle = GetRDPvalue(eachfile, "remoteapplicationname:s:"); + string appicon = basefilename + ".ico"; + string appicon32 = basefilename + ".png"; + string apprdpfile = basefilename + ".rdp"; + string appresourceid = appalias; + string appftastring = GetRDPvalue(eachfile, "remoteapplicationfileextensions:s:"); + string appfulladdress = GetRDPvalue(eachfile, "full address:s:"); + string rdptype = "RemoteApp"; + if (appalias == "") + { + rdptype = "Desktop"; + appalias = basefilename; + apptitle = basefilename; + appresourceid = basefilename; + } + else + { + rdptype = "RemoteApp"; + } + DateTime filedatetimeraw = System.IO.File.GetLastWriteTime(eachfile); + string filedatetime = DateTime.Now.Year.ToString() + "-" + (filedatetimeraw.Month + 100).ToString().Substring(1,2) + "-" + (filedatetimeraw.Day + 100).ToString().Substring(1,2) + "T" + (filedatetimeraw.Hour + 100).ToString().Substring(1,2) + ":" + (filedatetimeraw.Minute + 100).ToString().Substring(1,2) + ":" + (filedatetimeraw.Second + 100).ToString().Substring(1,2) + ".0Z"; + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + if (System.IO.File.Exists(HttpContext.Current.Server.MapPath("icon32/" + appicon32))) + { + HttpContext.Current.Response.Write("" + "\r\n"); + } + HttpContext.Current.Response.Write("" + "\r\n"); + if (appftastring != "") + { + HttpContext.Current.Response.Write("" + "\r\n"); + string[] appftaarray = appftastring.Split(','); + foreach(string filetype in appftaarray) + { + string docicon = basefilename + "." + filetype + ".ico"; + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + } + HttpContext.Current.Response.Write("" + "\r\n"); + } + else + { + HttpContext.Current.Response.Write("" + "\r\n"); + } + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + } + } + } + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); + HttpContext.Current.Response.Write("" + "\r\n"); +%>