Getting SID, renaming all names associated with ahk
Posted: 09 Nov 2020, 14:34
I think to bind the script to the SID, to avoid multi-use.
- Is it possible to get the SID in the code not through the registry? For example via cmd / powershell -> whoami / user? Maybe this is a better option.
I thought not to create two topics, but write in one. All the same, this refers to the preservation of information.
- How can you rename everything related to AHK? For example, the name of the process, change the icon and the rest, than you can associate the program with AHK.
It seems logical to rename it in order to slow down the definition of what exactly the program was written on.
If you already have this information somewhere, I will be grateful for the link or tip.
- Is it possible to get the SID in the code not through the registry? For example via cmd / powershell -> whoami / user? Maybe this is a better option.
Code: Select all
#NoEnv
F10::
regSID := rgtSID()
msgbox, %regSID%
rgtSID()
{
loop,HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList,1,1
{
if(a_loopRegName="ProfileImagePath")
{
regRead,rProf
if(inStr(rProf,a_userName))
stringReplace,SID,a_loopRegSubKey,SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\,,
}
}
return % SID
}
return
- How can you rename everything related to AHK? For example, the name of the process, change the icon and the rest, than you can associate the program with AHK.
It seems logical to rename it in order to slow down the definition of what exactly the program was written on.
If you already have this information somewhere, I will be grateful for the link or tip.