1) 保护参数配置

2) 注册表访问

using System.Security.Permissions;

[RegistryPermissionAttribute(SecurityAction.PermitOnly, All = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 4.0")]
private static void UpdateOS32RegisterItem()
{
using (RegistryKey currentKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 4.0", true))
{
currentKey.SetValue("MaxLocksPerFile", 0xF4240, RegistryValueKind.DWord);
currentKey.Close();
}
}

该种写法混淆后会出现如下的错误:

解决方法:

添加 应用程序清单文件,在其中加入

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果希望更改 Windows 用户帐户控制级别,请用以下节点之一替换
requestedExecutionLevel 节点。 <requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" /> 如果您希望利用文件和注册表虚拟化提供
向后兼容性,请删除 requestedExecutionLevel 节点。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>

修改代码,如下:

private static void UpdateOS32RegisterItem()
{
System.Security.Principal.WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent();
System.Security.Principal.WindowsPrincipal principal = new System.Security.Principal.WindowsPrincipal( identity );
if (principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator))
{
using (RegistryKey currentKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 4.0", true))
{
currentKey.SetValue("MaxLocksPerFile", 0xF4240, RegistryValueKind.DWord);
currentKey.Close();
}
}
}

Eziriz.Net.Reactor使用注意事项的更多相关文章

  1. [转载]Eziriz .NET Reactor 4.7.0.0 官方原版+破解补丁(强大的代码保护和软件防盗版工具)

    Eziriz .NET Reactor 是一个强大的代码保护和软件防盗版工具,完全由.NET框架编写..NET Reactor支持NET平台的软件许可系统,并支持NET程序集所有语言.当.Net编译器 ...

  2. net reactor加密源码保软件安全-net reactor使用教程

    上一次介绍用 Xenocode Postbuild for .NET 混淆加密源代码确保软件安全,本篇将讨论用 Eziriz .NET Reactor 混淆加密软件源代码,为从未用过该软件加密的用户分 ...

  3. .NET Reactor 命令行使用

    安装.NET Reactor工具软件.例如你的安装目录为:D:\Program Files\Eziriz\.NET Reactor 按如下步骤设置系统环境变量path. 将path变量的值中加入.NE ...

  4. [转].net reactor 学习系列(五)---源代码加密程序

    .NET Reactor使用教程(加密源代码示例) 1.打开 Eziriz .NET Reactor,主界面如图1所示: 图1 2.单击 Main Assembly 右边的 Open,选择要加密的软件 ...

  5. .NET Reactor使用教程(加密源代码示例)

    更多:https://www.cnblogs.com/PiaoMiaoGongZi/category/1120300.html 1.打开 Eziriz .NET Reactor,主界面如图1所示: 图 ...

  6. 软件License设计

    如何保护软件版权,最常用的办法就是设计一套license验证框架. 1.我们的常规需求如下: .可以限制软件只能在一台机器上使用: 目前很多软件都是一机一码的销售,软件换一台机器则不能使用,想要几台机 ...

  7. c++调用c#代码

    // ConsoleApplication1.cpp : 此文件包含 "main" 函数.程序执行将在此处开始并结束. // #include "pch.h" ...

  8. .net refactor 命令行

    VS中设置项目的编译后事件命令(此命令会在程序集生成后自动在原位置加密,覆盖原来的程序集): "C:\Program Files (x86)\Eziriz\.NET Reactor\dotN ...

  9. 使用.NET REACTOR制作软件许可证

    原文:使用.NET REACTOR制作软件许可证 软件下载地址:http://www.eziriz.com/downloads.htm 做一个简单的许可证系统,下面是具体步骤: 1,  OPEN AS ...

随机推荐

  1. POJ 1704 Staircase Nim 阶梯博弈

    #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int ...

  2. 性能测试问题_Mysql数据库服务器的CPU占用很高

    MySQl服务器CPU占用很高 1.  问题描述 一个简单的接口,根据传入的号段查询号码归属地,运行性能测试脚本,20个并发mysql的CPU就很高,监控发现只有一个select语句,且表建立了索引 ...

  3. C/C++类型转换

    1.隐式类型转换 1.1 隐式类型转换的规则 K & R A.6.5 Arithmetic Conversions(数值型间的转换)First, if either operand is lo ...

  4. 15 things to talk about in a healthy relationship

    15 things to talk about in a healthy relationship男女交往中可以谈论的15个话题 1. Your Daily Activities 1. 你的日常活动 ...

  5. JLink v8克隆版破解向导(此方法仅适用XP32位版 WIN7及以上和64位均不支持 建议使用虚拟机)

    此方法仅适用XP32位版 WIN7及以上和64位均不支持 建议使用虚拟机 摘要 Jlink 4.5版本之后驱动会识别老的克隆版的JlinkV8,Jlink软件在启动时会提示为克隆版本后退出.目前主流的 ...

  6. 预编译头文件 StdAfx.h

    预编译头文件: 最常见的使用场景就是 StdAfx.h 文件,在这个文件中包含常用的头文件,比如windows.h,cstdio,string,别的 .cpp 文件去包含 StdAfx.h 头文件.编 ...

  7. 299. Bulls and Cows

    题目: You are playing the following Bulls and Cows game with your friend: You write down a number and ...

  8. 如何在github上展示作品——为你的项目生成一个快速访问的网址如(DaisyWang88.github.io)

      (这里值针对Windos系统的,因为本人用的是Window系统,暂时没有条件在其他平台上测试)   1.创建命名为 <userName>.github.io的仓库.      这里的u ...

  9. Linux命令-date

    [root@localhost ~]# date 2016年 09月 07日 星期三 :: CST [root@localhost ~]# date "+%Y" [root@loc ...

  10. ajax 一个 gbk 目标后内容乱码的解决方案

    ajax 一个 gbk 目标后,如果内容出现乱码,说明服务器在送出内容时没有指定 charset,ajax 对于没有指定 charset 的 response 默认以 utf-8 来处理,所有出现乱码 ...