Program-created ID - must it be unique, and can I change it with text editor


PhilB

Well-known member
Power User
VIP
Local time
2:57 AM
Posts
917
Location
Western USA
OS
Windows 11 2H25
As the title says, can I change a Windows (?) ID created by some program. Can I change it randomly, say by incrementing the value by 1 or 10?
This specific example is a "smart collection" created by Adobe Lightroom Classic, but my question applies to an ID created by any program. E. g. Word macros or Outlook email rules.

A Lightroom "smart collection" is really a set of conditions based on keywords, metadata, text, whatever. All photos that match all the conditions are included in that smart collection, which is a virtual view. The photo files themselves are NOT moved. Creating a smart collection within Lightroom is cumbersome, given the UI, so I was wondering if I could edit one smart condition to create others, varying just some of the specifics.

This is the actual code for a smart collection. The parts I've underlined are one lines I would want to edit. I've also highlighted the ID.

As a side question, how are these IDs generated?

Win 11 2H23

-------------------------------------

s = {
id = "6875A4F5-0A21-4FD6-A257-AFAEC521167A",
internalName = "DELETEDs - ALL",
title = "DELETEDs - ALL",

type = "LibrarySmartCollection",
value = {
{
criteria = "pick",
operation = "==",
value = -1,

},
{
criteria = "keywords",
operation = "any",
value = "CURRENT",
value2 = "",

},
combine = "intersect",
},
version = 0,
}
 

My Computer My Computer

At a glance

Windows 11 2H25AMD 9900X64 GBAMD 9070 XT
OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
As a side question, how are these IDs generated?
Those are called GUID's. They're pseudo-random identifiers generated with an extremely low probability of duplicate ID's.

To create a batch of 10 GUID's in PowerShell:
Code:
powershell "for ($i=1;$i -le 10; $i++) { (new-guid).Guid.ToUpper() }"
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

Latest Support Threads

Back
Top Bottom