简体   繁体   English

我的 C# win 表单应用程序在内部调用批处理脚本如何在 Visual Studio 中导出时对最终用户隐藏它?

[英]My C# win form application internally calls a batch script how do I hide it from the end user while exporting in Visual Studio?

Inside my C# project, there is a folder called "scripts" that has my batch scripts inside it however while exporting the project I don't want the end-user to tamper with those scripts or make modifications.在我的 C# 项目中,有一个名为“scripts”的文件夹,里面有我的批处理脚本,但是在导出项目时,我不希望最终用户篡改这些脚本或进行修改。 I would really appreciate it, if there was a way to hide these scripts from the user completely.如果有办法对用户完全隐藏这些脚本,我将不胜感激。 OR Any other way that could possibly mask their existence completely.或任何其他可能完全掩盖其存在的方式。

Embed the Batch files as resources.将批处理文件嵌入为资源。 Save it to a temporary file, run it and delete the temporary file after it ran.将它保存到一个临时文件中,运行它并在运行后删除临时文件。

Depending on the content of the batch file, it might be possible to run the programs called by the batch file in C# directly.根据批处理文件的内容,可以直接在 C# 中运行批处理文件调用的程序。

There are also tools like Bat2Exe which convert the batch file into an executable, hiding that it once was a BAT file.还有像Bat2Exe这样的工具将批处理文件转换为可执行文件,隐藏它曾经是一个 BAT 文件。 Make sure to check the license conditions.请务必检查许可条件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将控制台应用程序中的变量值传递给 C# 中的 windows 表单应用程序(Visual Studio) - How do i pass a variable value from Console application to windows form application in C# (visual studio) 我如何在代码中检查是否选中了我的 DataGridView 复选框。 c# 视觉工作室 Windows 窗体 - How do I in code check that my DataGridView checkbox is selected. c# visual studio Windows form 如何在C#应用程序中嵌入字体? (使用Visual Studio 2005) - How do I Embed a font with my C# application? (using Visual Studio 2005) 如何使用Visual Studio在C#应用程序中发布Access数据库? - How do I publish an Access database with my C# application using Visual Studio? 如何在 Visual Studio C# 中创建表单实例? - How do I create an instance of a form in Visual Studio C#? 如何在 Mac 上的 Visual Studio 中编译 C# 应用程序? - How do I compile a C# application on a Mac in Visual Studio? 在调试Visual Studio 2010 MVC C#程序时如何从键盘获得输入? - How do I get input from the keyboard while debugging a Visual Studio 2010 MVC C# program? 如何从Visual Studio中开发的Android C#应用程序访问SoftLayer对象存储。 - How do I access SoftLayer object storage from a C# application for Android, developed in Visual Studio. 如何使用Visual Studio和C#Win Forms使Column AutoSize功能与ListView一起使用 - How do i get Column AutoSize functionality to work with ListView, using Visual Studio and C# Win Forms 如何从发送到我的电子邮件的文本框中获取信息? (C#,Visual studio 2013) - How do I get information from a text box sent to my email? (C#, Visual studio 2013)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM