Skip to content

Commit

Permalink
Fix ext resolving
Browse files Browse the repository at this point in the history
Confirmed working on Windows 7, rundll still doesn't work on the default image viewer
  • Loading branch information
Alfur 'Felt her' Deltur committed Aug 19, 2015
1 parent 7e8f997 commit e56f0bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SecureDesktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ static void Main(string[] args)

StringBuilder sb = new StringBuilder();
string procline = String.Format("\"{0}\"", String.Join("\" \"", args));
string ext = Path.GetExtension(args[0]);
string ext = Path.GetExtension(args[0]).ToLower();

if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 2)
//if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 2)
{
int i = 0;
for (; i < 10; i++)
Expand All @@ -46,7 +46,7 @@ static void Main(string[] args)
string file = "";
if (!ResolveExtension(ext, ref file)) break;
procline = String.Format("\"{0}\" {1}", file, procline);
ext = Path.GetExtension(file);
ext = Path.GetExtension(file).ToLower();
}
else break;
}
Expand Down Expand Up @@ -78,7 +78,6 @@ static void Main(string[] args)
WinAPI.SetThreadDesktop(hNewDesktop);
try
{

WinAPI.STARTUPINFO si = new WinAPI.STARTUPINFO();
si.lpDesktop = "securedesktop";
si.dwFlags |= 0x00000020;
Expand Down

0 comments on commit e56f0bc

Please sign in to comment.