How to create a new pointer for each installed instance?

I am using C #. Is it possible to make each installed instance a different director?

To be more specific, let's say I have an application called "abc" and a setting for it. Every time it is installed on another computer, I want it to be regenerated. If this is not possible, I always listen to new ideas.

Thanks in advance.

+4
source share
2 answers

Why not just check the file at startup? Then you can create a UID and paste it into a file. So, the next time the application loads, can you read the UID from the file?

It can be either based on each user (where you should put the file in your user folder), or on the installation (where the file is next to the executable file or somewhere outside the user's current directory, just watch for Windows File Permissions!).

+1
source

It looks like you want to uniquely identify the machine on which your application is installed. There are many ways to do this, but changing the build GUID is not a good option for this.

Instead, you should look at the configuration of the machine and create a unique identifier from it, and not generate a random identifier. For example, you can take the MAC address as a starting point.

This would make the machine unique id deterministic , which means that you do not need to store it anywhere, you can generate it every time you need it :)

Earlier versions of the GUID specification (version 1) actually used the MAC address of the machine as part of the GUID - however, this led to security problems and caused Melissa . The current GUID specification does not use MAC address data.

0
source

Source: https://habr.com/ru/post/1389074/


All Articles