2023-08-21

Device ID Asset Tag Management

DeviceID is a computer-tagging program that shows the machine's current IP Address, device name, user, and network status.  In the background, an inventory is written to a local report and optionally to a server, which the helpdesk will appreciate.  The program sits unobtrusively in the upper-right corner and periodically checks network conditions. 


Network status checks both internal and external IP addresses, confirming the machine can see the Internet.  Settings are adjustable and every object on this small panel is double-clickable, giving different reports, different features. 

Behind the scenes, DeviceID tracks an inventory of the hardware, free-disk space, OS settings, recent logins, and other interesting goodies.  If the report is allowed to live on a central server/share, the helpdesk can view activity, even if the user's machine is offline.  Inventory is tracked through simple ASCII files; no database required.

Free to download and use for all personal, commercial, and governmental use. 
* No registration
* No nagware
* No spying
* DeviceID does not call back to the mothership

Features:

  • Network status is periodically tested against internal (company) and external (Google) sites.  Red-green, yellow flags show the current status.

  • An inventory report shows the OS version, free-disk, memory, installed printers, CPU, the last 10 logins, etc..

  • Reminds users to reboot every (x) days.  Configurable from a central location. 

  • From a central server, the program can optionally run scheduled tasks, installation, and other routines. 
    This is not meant to replace a full-featured software installation server, but could be handy for a smaller business.

  • From a central server, emergency messages can be sent.  Alerts, such as "Database maintenance today at noon."  

Although this is a long article, and it seems complicated, it really only takes a minute to set up.  The advanced features can be ignored.  Although designed for small to medium-sized businesses, the program is useful on standalone machines.  I run this program on my home network, mainly for IP and network status.

Downloading and Installing:

Here are the fast installation instructions where the program can be run directly from the Downloads directory.  It needs a minor installation step.  
 
To install, download the .exe and place in any temp folder on your hard disk. 

 
A.  Download Link:

From Keyliner's public GDrive, click this link and download to a local temp or download directory.  Do not download directly into ProgramFiles. 

Download Link: Version 1.30 (New, 2023.10)
File Link:  DeviceID.exe - contains standalone .exe.

deviceID.exe MD5 check:

a5-d6-6b-f7-37-97-30-68-a4-1f-34-17-f6-25-24-c3

SHA-256:
d93b32d976492870ab99559b2378c3e11fc21c3f6295b3e1409eac68d7bd1d50

When downloading, different browsers behave differently.
You will be prompted the file cannot be scanned.  Click "Download anyway"

Microsoft Edge:
Prompts "DeviceID.exe" was blocked because it could harm your device (it is an .exe from the Internet). 

"Click See More" and allow the download. 

With Microsoft Edge, the downloaded file appears in your Downloads directory with a random name, such as "Unconfirmed 780359.crdownloaded" (name varies).  Use File Explorer to rename the file to "DeviceID.exe".

B.  Mark the program as safe-to-run:

(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway")

Using File Explorer, right-mouse-click the downloaded (and re-named) .exe 

Select "Properties"
Check [x] Unblock.  This removes the "mark of the web." 

                 Click for larger view

* Only do this if you trust keyliner *and* only if downloaded from keyliner's public GDrive. 

If "Unblock" is not visible, it has already been unlocked (by Microsoft Edge).
Once [x] Unblocked is clicked, this security menu disappears.

C.      For a first-time run, launch with a setup switch
Click "Start" and immediately type the word "Run" (enter).  A dialog opens.

From the Run box, use File Explorer to click and drag the downloaded "deviceID.exe" program into the run box (illustrated below).  Append a "/setup" switch and allow the program to run: 
DeviceID.exe /setup


Since keyliner cannot afford a signing certificate, you will be prompted that the file is not safe (being downloaded from the internet).  Click "more information" and allow the program to run.

Choose "[x] Server simulation"
Click "ok"

This writes two INI control files to the same directory.  For the initial test, they can be ignored.  Details below.


D.      From the same directory, re-launch DeviceID.exe (without the /setup switch)
The program should be running.
See panel in the upper-right corner of the primary monitor.
 

Details:
/setup builds two .ini files, both stored in the local directory. 
The default settings will run as-is, which is good enough for initial testing:

C:\downloads\DeviceIDLocal.ini   (where the .exe was stored)
C:\downloads\DeviceIDServer.ini 


Using Notepad, you can edit the ini files to see what they are up-to. 

The local ini points to the server file and to an optional user-specific 'reminders' file (a calendar).  The Server ini describes shared network resources, messages, etc, and is intended to live on a shared, centralized server.  The server file contains global settings, a place to put messages, and other settings.



For a more professional installation:

To install the program 'more properly,' follow these slightly more advanced steps.  Use these steps for a more formal installation.

Setup

1.  Server Share Setup

If using a central server (typical for a business, but not for a home user), make a dedicated server folder, typically a server share (It helps to pre-build these directories, but DeviceID will attempt to create them, provided your account has rights).  If not using a server, select option [x] ServerSimulation.

For example:

P:\Software\Util\DeviceID\wsConfig     //A server share
   (use any path - system .ini files live here)

P:\Software\Util\DeviceID\wsInventory 
   (workstation inventory reports live here)

Set end-user rights: 
If using [x] ServerSimulation, ignore this step.
Set all users to "Read-only" rights to the top-level "util\DeviceID" folder, cascading down. 
Set all users to "Change" rights at the wsInventory. 


2.  Complete the initial download, described above.

Place the .exe in a temporary working folder (download folder is fine)

3.  From the download directory, temporarily, launch the program using the /setup switch

a.  Click Start, type the word "Run".  Launch the Windows "Run" app.
b.  In the small Run box, use File Explorer and drag "DeviceID.exe" into the box.  (Or browse)
c.  In the RUN dialog, after the .exe, type {space} /setup
d.  Click OK and allow it to run

4.  Build Default Settings and Folders

From the Setup panel, which opens after typing /setup:
Browse to a server folder (P:\software\util\DeviceID) where the Inventory and ServerConfig files can roost - this is typically a server share. 

From the setup screen:

Click for larger size

Ideally, this folder should be pre-built.  If not, DeviceID attempts to create the directories, provided your account has rights.  If you don't have rights, it will still record that path in the ini-control files, assuming you will fix the missing path later.

If testing on a stand-alone workstation, or if testing without using a server, check
[ ] SeverSimulation
(recommended if you just want to play with the program and not make a commitment -- see C:\Temp\ServerSimulation\DeviceID).

Click button "Build ini Files"


5.  Results


New Directories:

a.  C:\Users\(you)\prefs\DeviceID   for workstation and user-specific data
b.  C:\temp\ServerSimulation\DeviceID
c.  C:\Temp\ServerSimulation\DeviceID\WSConfig  (all users have READ only rights)
d.  C:\Temp\ServerSimulation\DeviceID\WSInventory (all users need Create/overwrite rights)

New INI files are built:

File and folder schematic:

Click for larger view

DeviceIDLocal.ini

Distribute the .exe and this INI file to any workstation. 
Typically copied to C:\program files\Util  or location of your choosing, placing both files in the same directory.  For testing, these can be in the TEMP folder.
The .INI contains a pointer to the server's config file.

(End-users are not expected to have rights to edit the INI file and this is why ProgramFiles is a good choice.)

DeviceIDServer.INI

(This second INI file is a server file.  For testing, it can also be in the TEMP\ServerSimulation  folder)

The first INI file (DeviceIDLocal) tells the workstation where to find the server's INI file. The server INI file contains all the settings you want the workstations to share.   Plus other server-administration settings, such as global messages, etc.

Both INI files are editable with notepad and you are invited to explore. 

Next, position the program and icon as-if it were in production.  (This is a continuation of the "more professional install steps)


5.   Create a Program folder to hold the program:

For the local user, end-user workstation:

a.  With File Explorer, open folder C:\Program Files,
b.  Create a subfolder  C:\Program Files\Util  (for example)

c.  Copy the program file:

Copy "DeviceID.exe" to C:\Program Files\util
Copy "DeviceIDLocal.ini" to C:\Program Files\util

Do the copy as a two-step, copying from the download folder into Program Files.  Windows security will not let you download directly into Program Files (technically, you will not be able to remove the "mark of the web" if downloaded directly into Program Files).

DeviceIDLocal.INI is purposely in C:\Program Files.  Reason: Most end-users (should not) have administrative rights and won't be able to edit the file.  This is by design.  This forces their connection to the server-share.

6.  Position the Server Control file

If using a server
Copy DeviceIDServer.ini  to P:\software\util\DeviceID\wsConfig

If not using a server ([x] ServerSimulation), leave the folders and files as-is in the C:\Temp folder.
(See DeviceIDLocal.ini for the location being used)


7.  Optional: Create a Start Menu Tile:

Using File Explorer, in C:\Program Files\util
Right-mouse-click the executable and "Pin to Start"

Auto-launch steps below.


8.  Auto Launching:

Allow DeviceID to auto-launch at boot.  Place a shortcut in the workstation's "Startup" folder.  Optionally, put the program in a login script (not recommended because the program will not run off-network; it is better to run at the workstation level):

a.  Using File Explorer, tunnel to
C:\Users\<you>\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup

b.  In the Startup folder, right mouse click a blank area on the detail side, "create shortcut".
Set the path to C:\program files\util\DeviceID.exe


Testing

With setup complete, and assuming the ServerSimulation (or server directory),

- Confirm DeviceIDLocal.ini is in the same directory as the .exe. 
- Use File Explorer to double-click the .exe, which launches the program.

Expected results:

a.  Program loads in upper-right corner, Network Status = (green)

b.  Folder C:\Users\<you>\Prefs\DeviceID has an inventory report.  On my computer this is called "Oscar.txt", where Oscar is my workstation's Name.

c.  Using FileExplorer, see folder C:\temp\ServerSimulation\DeviceID\WSInventory for the server version of this same inventory report.  Useful for helpdesk research.

d.  On the running program, double-click the workstation's name for small report.

e.  On the running program, double-click the word "DeviceID" for full workstation report

f.  Optionally: On the running program, double-click your user-id.  Allow it to build a reminder file, such as "Bob's birthday on 08/22". 

g.  Hover mouse over IP Address to see the external-facing IP address.


Off Network Workstations

If the workstation is off network (and it can't detect the Server.ini), the program disables all server-related activity.  The local intranet test site temporarily changes to the nearest router, detected automatically (e.g. 192.168.1.1).

The External Test Site temporarily defaults to www.google.com, in case your default pingable server was different (these preferences are on DeviceIDServer.ini).  Colored status indicators continue to work.

The local inventory is still written to C:\Users\<user>\prefs
The server inventory is skipped.


For Documentation:  Generated INI files:

Example Local.ini

(at each workstation)

;DeviceID Local INI Control File
;Directs DeviceID to the ServerControlFile; must be in current DeviceID.exe directory
;Position-dependent file; do not change structure or line counts

ServerControlFile             = C:\temp\ServerSimulation\DeviceID\WSconfig
                                                         \DeviceIDServer.INI
LocalReminderFile             = C:\users\<username>\prefs\DeviceID
                                                          \DeviceID_Reminder.ini
WorkstationOffsiteFlag        = N
LocalDisableRebootNagSW       = N
LocalDisableRunEventsSW       = N
LocalHorizontalOffsetPixels   = 0
LocalVerticalOffsetPixels     = 0


Example Server.ini

(At the server's WSConfig folder)

;DeviceID
;ServerControlFile DeviceIDServer.INI; Do not delete
;Note: Workstations have a local file that points to this file
;Example location:  \\Server\Share\Util\DeviceID\Config\DeviceIDServer.INI

[General]
ServerInventoryDirectory              = C:\Data\proj\util\DeviceID\serverSimulation\DeviceID\WSInventory
DefaultLocalReminderINI               = C:\Users\<username>\prefs\DeviceID\DeviceID_Reminder.ini
ActiveDirectoryLDAPPath               = cn=prod,dc=mycompany,dc=com
DefaultHomeDataDirectory              = H:\Data
PhysicalLocation                      = Main Campus

InternalTestSite                      =
ExternalTestSite                      = www.google.com
ExternalIPAddressTestSite             = https://api.ipify.org  ;Shows external-facing IP address

RebootNagWarningDaysYellow            = 5
RebootNagPromptDaysRed                = 7

[Launch Run Events]
;This event can be set to run on program launch.  This is a one-time event per launch.
RunAtLaunch                           = N
RunAtLaunchCommand                    =
RunAtLaunchParameter                  =
RunAtLaunchMarkerFileName             =

[Emergency Run Events]
;Run these events in an Emergency with an optional user prompt
;Caution: RunLine is and can be called multiple times; manage duplicate runs with Run Once Marker Filename
;When used, Usually RunAtLaunch=Y, RunAtHourlyCycle=Y, with marker filename, for fastest results
EmergencyRunAtLaunch                  = N
EmergencyRunAtHourlyCycle             = N
EmergencyPromptMessageHeader          = Important Message:
EmergencyPromptMessageLine1           = This is an example emergency message
EmergencyRunCommand                   = notepad.exe
EmergencyRunParameter                 =
EmergencyRunMarkerFileName            =


Set an example emergency message:

Optionally: The program can connect to a server to show simulated company-wide messages or to run company-wide programs.

With your copy of DeviceID still running,

Edit C:\Temp\ServerSimulation\DeviceID\WSConfig\DeviceIDServer.ini

- Set "EmergencyRunAtLaunch = N   (no need for this test)
- Set "EmergencyRunAtHourlyCycle = Y
- Set "EmergencyPromptMessageLine1 = "Database maintenance tonight"

Leave all other Emergency fields blank. Save the file.
Results:  After roughly an hour, and then bugged every hour after that, users will see the database maintenance message.

Edit the file again. 

Set "EmergencyRunMarkerFileName" to something like: 
2023.0828-DatabaseMaint.txt  (any made-up name). 
Save the file.

Results: After another hour, the user is bugged once, then never again

Marker files are stored per workstation.  See C:\Users\<you>\prefs\DeviceID. 
Delete the marker file and they will be nagged again. 
Recommend using unique marker file names with any Emergency Run. 
Only one Emergency allowed at-a-time.

The hour delay is to keep the server from being overwhelmed if everyone logs in at 8:00am and the delay is randomized.


Testing Comments

Because of the ServerSimulation, WSInventory will only have one workstation -- yours.  In real life, all workstation writes to this directory.  Fifty workstations = fifty files. 



I would appreciate hearing about your experiences with this program.

Version History:
1.10 Initial Release
1.11 Generates inventory report on demand, not just at launch.  Double-click label. Ping testing less aggressive if all "green". 
1.20 Added External-facing IP Address reporting.  Click once, then hover on displayed IP Address.
1.30 Added OneDrive backup for Reminder.INI file; Reminders now move across machines via OneDrive.  If OneDrive not available, feature disables.


Related Keyliner Programs
Midy5 Checksum finder
Directory Pulse Disk Management

The program is a free keyliner-developed application, with no registration, no sign-in, no ads, and does not call the mothership.  Write this program yourself!  This started out as a Student project in my book War and Peace Programming Volume 6 (Visual Studio C#) - Project 5.     


No comments:

Post a Comment

Comments are moderated and published upon review. (As an aside, not a single spam has been allowed through; why bother?)