-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from ScottyMac52/featureFixSaveException
1. Removed the Modify dialog
- Loading branch information
Showing
18 changed files
with
365 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{957B51AC-5241-4213-9553-7623BD0AA2C6}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>CustomActions</RootNamespace> | ||
<AssemblyName>CustomActions</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\Output\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\Output\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Configuration.Install" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Management" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="SetUserPerms.cs"> | ||
<SubType>Component</SubType> | ||
</Compile> | ||
<Compile Include="SetUserPerms.Designer.cs"> | ||
<DependentUpon>SetUserPerms.cs</DependentUpon> | ||
</Compile> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> | ||
<StartAction>Program</StartAction> | ||
<StartProgram>C:\Users\Scott\Source\Repos\MFDisplay\Deploy\setup.exe</StartProgram> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("CustomActions")] | ||
[assembly: AssemblyDescription("Defines custom install actions for the installer.")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Vyper Industries")] | ||
[assembly: AssemblyProduct("CustomActions")] | ||
[assembly: AssemblyCopyright("Copyright © 2019 Vyper Industires")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("957b51ac-5241-4213-9553-7623bd0aa2c6")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
using System.Collections; | ||
using System.ComponentModel; | ||
using System.Configuration.Install; | ||
using System.IO; | ||
using System.Security.AccessControl; | ||
using System.Security.Permissions; | ||
using System.Security.Principal; | ||
|
||
namespace CustomActions | ||
{ | ||
[RunInstaller(true)] | ||
public partial class SetUserPerms : Installer | ||
{ | ||
public SetUserPerms() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
[SecurityPermission(SecurityAction.Demand)] | ||
public override void Install(IDictionary stateSaver) | ||
{ | ||
base.Install(stateSaver); | ||
|
||
// This gets the named parameters passed in from your custom action | ||
string folder = Context.Parameters["folder"]; | ||
|
||
var powerUserSid = new SecurityIdentifier(WellKnownSidType.BuiltinPowerUsersSid, null); | ||
var userSid = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null); | ||
var creatorOwnerSid = new SecurityIdentifier(WellKnownSidType.CreatorOwnerSid, null); | ||
|
||
// This gets the built in users group | ||
File.AppendAllText(Path.Combine(folder, "customactions.log"), $"{Environment.NewLine}{DateTime.Now.ToShortDateString()} {DateTime.Now.ToShortTimeString()} : This is output from the installer, Creator: {creatorOwnerSid?.Value} PowerUser: {powerUserSid} User: {userSid} the folder: {folder}{Environment.NewLine}"); | ||
var writerulePowerUsers = new FileSystemAccessRule(powerUserSid, FileSystemRights.FullControl, AccessControlType.Allow); | ||
var writeruleUsers = new FileSystemAccessRule(userSid, FileSystemRights.FullControl, AccessControlType.Allow); | ||
var writeruleCreator = new FileSystemAccessRule(creatorOwnerSid, FileSystemRights.FullControl, AccessControlType.Allow); | ||
|
||
if (!string.IsNullOrEmpty(folder) && Directory.Exists(folder)) | ||
{ | ||
// Get your file's ACL | ||
DirectorySecurity fsecurity = Directory.GetAccessControl(folder); | ||
|
||
// Add the new rule to the ACL | ||
fsecurity.AddAccessRule(writerulePowerUsers); | ||
fsecurity.AddAccessRule(writeruleUsers); | ||
fsecurity.AddAccessRule(writeruleCreator); | ||
|
||
// Set the ACL back to the file | ||
Directory.SetAccessControl(folder, fsecurity); | ||
|
||
File.AppendAllText(Path.Combine(folder, "customactions.log"), $"{Environment.NewLine}{DateTime.Now.ToShortDateString()} {DateTime.Now.ToShortTimeString()} : folder: {folder} was processed.{Environment.NewLine}"); | ||
} | ||
|
||
} | ||
|
||
[SecurityPermission(SecurityAction.Demand)] | ||
public override void Commit(IDictionary savedState) | ||
{ | ||
base.Commit(savedState); | ||
var site = Context.Parameters["site"] ?? "https://github.com/ScottyMac52/MFDisplay/wiki"; | ||
System.Diagnostics.Process.Start(site); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.