安装后如何检查我的C#窗口应用程序是否在第一次运行 [英] how to check whether my c# window app is running first time after installation

查看:117
本文介绍了安装后如何检查我的C#窗口应用程序是否在第一次运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我制作了Windows应用程序的exe.我希望当我的exe安装在系统上并首次运行到计算机上时,我想检查它是否第一次运行,然后系统将自动重新启动,并且在第一次运行后,系统应该不能每次都重新启动.

我可以这样做吗?请帮帮我.

在此先感谢您.

Hello Everyone,


I made exe of my window application.I want that, when my exe installed on system and run first time to machine.I want to check if it is running first time, then system will reboot automatically, and after running first time, system should not be reboot every time.

Can i do this ? Please help me.

Thanks in advance.

推荐答案

您可以在数据库表中添加一个status_flag字段,并在首次运行应用程序时将其填满.您需要检查该字段是否已经包含一个值,如果已经包含一个值,那么它不是第一次运行:)

问候,
爱德华
You can add a status_flag field into your database table and fill it up on first run of application. You need to check that field if it already contains a value, if it does, then it isn''t the first run :)

Regards,
Eduard


这篇关于安装后如何检查我的C#窗口应用程序是否在第一次运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆