每个已部署应用程序的唯一ID /代码 [英] Unique id/code of every deployed application

查看:65
本文介绍了每个已部署应用程序的唯一ID /代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信来自VS的每个部署产品(应用程序)都有一个独特的id或类似的smth,它不会改变分布。我的意思是我发布了一个应用程序并将其交给一个拥有100名员工的公司,并且该产品在安装的每台PC上都保留了相同的唯一ID。



我从程序项目的汇编信息中遇到了GUID,但我不确定是那个。那么有什么类似产品的唯一ID,如果是 - 我在哪里可以找到它以及如何在代码本身中访问它。即:字符串uniqueID = Something.getProductID()或其他...

I believe every deployed product (application) from VS has a unique id or smth like that, that doesn't change over distribution. What I mean is that I publish an app and give it to a company with 100 employees and the product remains with the same unique ID on every single PC it is installed.

I have come across GUID from Assembly Information of the program's project, but I am not sure it is that one. So is there anything like such unique id of the product, and if yes - where can I find it AND how can I access it in the code itself. I.e.: string uniqueID = Something.getProductID() or whatever...

推荐答案

使用文本编辑器(即不是Visual Studio)打开解决方案文件并查看guid用于识别解决方案中的项目。每个项目都有一个guid(通常是每个.exe和.dll),而不仅仅是整个应用程序。



还有一个用于识别特定内容的guid安装程序文件中安装的产品的版本(即.msi文件)。当您使用安装程序安装较新版本的产品时,它会在安装之前检查当前安装的版本的guid ...所以这适用于应用程序的每个版本(好的,每个版本)。
Open the solution file with a text editor (ie. not Visual Studio) and look at the guids used to identify the projects in the solution. There is a guid for each project (generally every .exe and .dll), not just for the entire app.

There is also a guid used to identify a particular version of an installed product in an installer file (ie. .msi file). When you install a newer version of your product with an installer, it checks the currently installed version's guid before installing... so this is for each version (okay, each build) of the app.


这篇关于每个已部署应用程序的唯一ID /代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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