Skip to content

Commit

Permalink
use nsudo
Browse files Browse the repository at this point in the history
  • Loading branch information
rounk-ctrl committed Oct 13, 2023
1 parent e69a527 commit 9f1a31c
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 101 deletions.
4 changes: 2 additions & 2 deletions Rectify11Installer/Core/Backend/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static bool WriteFiles(bool icons, bool themes)
{
if (icons)
{
if (!Helper.SafeFileOperation(Path.Combine(Variables.r11Folder, "wsudo.exe"), Properties.Resources.wsudo, Helper.OperationType.Write))
if (!Helper.SafeFileOperation(Path.Combine(Variables.r11Folder, "NSudoL.exe"), Properties.Resources.NSudoL, Helper.OperationType.Write))
return false;
if (!Helper.SafeFileOperation(Path.Combine(Variables.r11Folder, "Rectify11.Phase2.exe"), Properties.Resources.Rectify11Phase2, Helper.OperationType.Write))
return false;
Expand Down Expand Up @@ -235,7 +235,7 @@ public static bool Cleanup()
Helper.SafeDirectoryDeletion(Path.Combine(Variables.r11Folder, "themes"), false);
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "themes.7z"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "7za.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "wsudo.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "NSudoL.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "ResourceHacker.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "ResourceHacker.ini"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "Rectify11.Phase2.exe"));
Expand Down
2 changes: 1 addition & 1 deletion Rectify11Installer/Core/Backend/Icons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static bool Uninstall()
}

Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "Rectify11.Phase2.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "wsudo.exe"));
Helper.SafeFileDeletion(Path.Combine(Variables.r11Folder, "NSudoL.exe"));

Logger.WriteLine("Icons.Uninstall() succeeded.");
Logger.WriteLine("══════════════════════════════════════════════");
Expand Down
6 changes: 3 additions & 3 deletions Rectify11Installer/Core/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ public static bool SafeDirectoryDeletion(string path, bool ischild)
}
public static void RunAsTI(string file,string param)
{
Interaction.Shell(Path.Combine(Variables.r11Folder, "wsudo.exe")
+ " -T " + file
Interaction.Shell(Path.Combine(Variables.r11Folder, "NSudoL.exe")
+ " -U:T -P:E -Wait -UseCurrentConsole " + file
+ " " + param, AppWinStyle.NormalFocus, true);
}
#endregion
Expand Down Expand Up @@ -493,7 +493,7 @@ public static void WriteLine(string s, Exception ex)
=> Text += s + ". " + ex.Message + Environment.NewLine + ex.StackTrace + Environment.NewLine + Environment.NewLine;

public static void CommitLog()
=> File.WriteAllText(System.IO.Path.Combine(Variables.r11Folder, "installer.log"), Text);
=> File.WriteAllText(Path.Combine(Variables.r11Folder, "installer.log"), Text);

public static void Warn(string v)
=> WriteLine("[WARNING] " + v);
Expand Down
137 changes: 57 additions & 80 deletions Rectify11Installer/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions Rectify11Installer/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -28576,7 +28576,7 @@
TY14mjisajrlCxmPVc5bnLVylTXPyW8YzOkrKa7THEUMS4gjAREKqiihDBsRWnVSLCRpX+rgH3H9CXIp
5CqBkWMBFWiQXT/4G/zu1spPTXpJQQnoenGcjzGgexdo1Bzn+9hxGieA/xm40lv+Sh2Y+yS91tLCR8DA
NnBx3dKUPeByBxh+MmRTdiU/TSGfB97P6JmywOAt0Lvm9dbcx+kDkKaulm+Ag0NgvEDZ6x3u3dPe25//
uP1B+gHVcHLOYev7uAAAAAlwSFlzAAALDQAACw0B7QfALAAAAAd0SU1FB+cEFRUPCihyFL0AAEggSURB
uP1B+gHVcHLOYev7uAAAAAlwSFlzAAALDAAACwwBP0AiyAAAAAd0SU1FB+cEFRUPCihyFL0AAEggSURB
VHhe7d13dxznlSbw+QJ7dv7Zs/vHnrMfZdaenZn1jiWLJHIics4Ac1K0skRFy7JkW9LIY1mSbXlk2ZKD
PLZlW6SYSYAASJDIOQOMkN699w1Vb1W/BTaKDaBBPs85z2kkAqCo+uHiVnX33yEIgiAIgiAIgiAIgiAI
giAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAI
Expand Down Expand Up @@ -29200,7 +29200,7 @@
<data name="iconnewtree" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAANsAAADTCAYAAAAI0GYtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DgAACw4BQL7hQQAAfFdJREFUeF7tvQm4ZVV17X9vXqIgSgERjREFe2lMUIMCojSidEoXsU0U/GtEoFqK
DQAACw0B7QfALAAAfFdJREFUeF7tvQm4ZVV17X9vXqIgSgERjREFe2lMUIMCojSidEoXsU0U/GtEoFqK
ouhL897zvcSo7yUamyj4bBDpRGwQ1BIUsaEHwR5RAbGjU2OXu/9jzDXH3HOts8+tWzRVXLibb3xr7bX3
OdS9Z//umHOutfeZmNvmtrltbpvb5ra5bW6b2+a2uW1um9vmtrltbpvb7uq2YsVOEyveeMLEijeshK6D
ujndq3ULhM9qxdugrf1TnNvu1ZtBZoANfaBzmj0ieDv5pzq33au2FSs2gJO9deBDm9OsFj9TfLZz271k
Expand Down Expand Up @@ -29737,7 +29737,7 @@
<data name="U" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAQEAAAExCAYAAAB8lhdQAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vgAADr4B6kKxwAAAEhlJREFUeF7t3emLHNXbxvH6OxRcEEERBN8oCoqCLwQVF1zBFUXjvqEGt6jR4BKN
vQAADr0BR/uQrQAAEhlJREFUeF7t3emLHNXbxvH6OxRcEEERBN8oCoqCLwQVF1zBFUXjvqEGt6jR4BKN
uMQ9btGoMRE1mIhb1GjUaNyNBpe4a8wyJmMWEM6P6/CcpqZTM/bEO/dTPff3wIdMV1VXhzP3ubqquqdO
tXLN+hTNqrUbtojVgxuBvlM1FTN609ShQL8hBP5PU+cAEVRNCwHEQQgAwRECQHCEABAcIQAERwgAwREC
QHCEABAcIQAERwgAwRECQHCEABAcIQAERwgAwRECQHCEABAcIQAERwgAwRECQHCEABAcIQAERwgAwREC
Expand Down Expand Up @@ -32533,7 +32533,7 @@
<data name="gadgets" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAANMAAAC6CAYAAAA0/HhLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DgAACw4BQL7hQQAAfbVJREFUeF7tnQeYFMXWhn+VnGR3ATNiVswEASNGkJxz2pxzzrtszsQl5yA5J1EE
DQAACw0B7QfALAAAfbVJREFUeF7tnQeYFMXWhn+VnGR3ATNiVswEASNGkJxz2pxzzrtszsQl5yA5J1EE
QTCAgCg5ZxAV9V7v1eu9ff5zTlX11Mw20QURp5/ne6qnu6ZnYOrd75zT1d3/9xdbbm3cuHHFBg0aVMH1
mvd16HX3y+8fzXn90/Mn3/j8Z3h90w+7X152IPHhLl734v7bUTWkal2o7z3v9uW+derUqUmidau+r6zY
n0B9XVxc+Lh169al497u9kb3e/S+LbW+tJ/6oiyP69C3luxreVz+Dqtsx6XPl9+hFvV9ddXBXP249G97
Expand Down Expand Up @@ -33075,7 +33075,7 @@
<data name="wallpapers" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iV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ly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXL
Expand Down Expand Up @@ -37574,7 +37574,7 @@
K44lPCDclbRsyQ/MljipeEOxlcmbP/dUL2xetmemlS6zkygTxJhCwyDPKhlyhGW1RXGJy36kir/D90+J
yxDXKqY4xljDQvf9qD/43a2b6u8rJTVHoP7Z8967oWEbigXP+zryvOIx1D7BpV32rx3C8IfohbLWdQCt
m3B+VdaMHbjYgtBjVnd0X6qVGUil4O1UvmkO2m6gaaHU288+J/eQkK4mr2FvH3rSkr1Y5d2Nlb39ecbv
j8g36+Fy14kyuVkAAAAJcEhZcwAADr0AAA69AUf7kK0AAAAHdElNRQfnBBMWGRoOcFCLAABekElEQVR4
j8g36+Fy14kyuVkAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAHdElNRQfnBBMWGRoOcFCLAABekElEQVR4
Xu29baxt13Ud5jZp06RJk7z3SH1YpMgnyhIpkrIoUaRcy7ZgSQX0SMm2KJlfkoM+ErYlNSZpRErFyrVF
SolkxzbJgJRFGiQtiqICCAhSgAQaQLbYAm0RiD+Khm3aAkzk8ofTokX6o/x5usY+a+w7zrhzrr3PeU9u
Ac4JDOy15hxzrrXvnmu8fe59790fKSsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
Expand Down Expand Up @@ -37990,7 +37990,7 @@
LjuWcL9wR8qyJT84U+KU4nXFVrZg/txTvbBhyZ6eUrrMdsYYZ5I4GgYFVsiSJyqrLYpLQvZjVfxtvj8u
LkNcK5jiGGEVC933o/7gd7duuq+3lNQQg5pnz3vvhNptKG553teR5xWPIfQEl3bZv3oIgx+ib5W1jgNo
2oDzq7Jm7MDFJrQ+5nRH96WQzGA6DW+n8k2z0HwD9fOl3n72ObmHpHQ1cQ17+9CVkeyFKu+uq+ztzzN+
f8S+AdWEcs7TDTOhAAAACXBIWXMAAA69AAAOvQFH+5CtAAAAB3RJTUUH5wQVEx0fOdb8NwAAIZlJRE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qkUqSG6RC+y4h2dhjut3T7QHbYDMtY+hR
A8YsBgkJEGAYYzzGbnqZ9nQ309PdIIRRaQHpzP+dOCfuiRN/xI24eaMyq3T+53mfvDe2vHkz3i9ORJyI
eIcrV65cuXLlypUrV65cuXLlypUrV65cuXLlypUrV65cuXLlypUrV65cuXLlypUrV65cuXLlypUrV65c
Expand Down Expand Up @@ -40314,7 +40314,7 @@
UyeeIY5oukH5QtZjjfMWZ71SZ+1z8huG88ZKmus0xxDHEhJIQoKKOsqowEaUVoMUCynal3v4R1x/klwq
ucpg5FhAFToU1w/+Br+7tQrTU15SWAb6XhznYxwI7gKthuN8HztO6wTwPwNXRsdfbQJzn6Q3OlrkCBjc
Bi6uO5q6B1zuAMNPNcVUXMlPUygUgPczeqYcMHQL9K95vbX3cfoAZKir5Rvg4BCYKFL2eo97h7p7+/Mf
tz/IP2K0cqCm0YrQAAAACXBIWXMAAAsOAAALDgFAvuFBAAAAB3RJTUUH5wQUCAkQLwgdBwAAXdlJREFU
tz/IP2K0cqCm0YrQAAAACXBIWXMAAAsNAAALDQHtB8AsAAAAB3RJTUUH5wQUCAkQLwgdBwAAXdlJREFU
eF7tvXfQZdWV5anqru4xEcVMx/w9UxETY6pK1SUL6d3nvXfpSUzinQBhSgZV15RRqVoGhJCENwmZQJKk
z/zSe2/wCFVJ1QJkWkLeIKRzZq299zn33Pvu+zITIdCT3olYsc817yXm/nLtve99576rPuqjPuqjPuqj
PuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqjPuqj
Expand Down Expand Up @@ -40742,7 +40742,7 @@
<data name="asdf" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAJEAAAB5CAYAAAA5z8PMAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
EQAACxEBf2RfkQAAItNJREFUeF7tnQd4FVX6xocVRF0FLGthV81aEHVX2V1WXZd1wbIWVkBWcVWECCK9
EAAACxABrSO9dQAAItNJREFUeF7tnQd4FVX6xocVRF0FLGthV81aEHVX2V1WXZd1wbIWVkBWcVWECCK9
SpEmofcO0oSE3qUYqmAoKsWCIKgrakBC6IYiISQk7//9zsy5nAwn5XKzJux/7vP8nrll7tybOb/7ft+Z
uVwcfdmzZ0/lH374IYGkEAQE5IJ4Eu2p414oULekpCQcOXIEKSkpOHr0aEBAjhw+fBjii3ijBEpMTIyW
OwJ5AsJBfBFv6E9lR6Lp0KFD1hUDAnJDEkn8EYmsKwQE5IWkEf1JCSQKiAjxJ5AoICICiQIiJpAoIGIC
Expand Down Expand Up @@ -40894,7 +40894,7 @@
AElFTkSuQmCC
</value>
</data>
<data name="wsudo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wsudo.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="NSudoL" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NSudoL.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
1 change: 1 addition & 0 deletions Rectify11Installer/Rectify11Installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@
<None Include="Resources\Rectify11ControlCenter.exe" />
<None Include="Resources\config1.txt" />
<None Include="Resources\config2.txt" />
<None Include="Resources\NSudoL.exe" />
<Content Include="Resources\ResourceHacker.exe" />
<None Include="Resources\light.msstyles" />
<Content Include="r11.ico" />
Expand Down
Binary file removed Rectify11Installer/Resources/wsudo.exe
Binary file not shown.

0 comments on commit 9f1a31c

Please sign in to comment.