2015 m. gegužės 7 d., ketvirtadienis

HKEY_USERS regitrų grupės modifikavimas

//Parodo vartotoju sid
gwmi win32_userprofile | ft localpath, sid

//Gauna konkretaus userio ssid
$objUser = New-Object System.Security.Principal.NTAccount("MARK")
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
$strSID.Value

//Gauna userio sid(trumpesnis)
$User = New-Object System.Security.Principal.NTAccount($env:UserName)
$sid = $User.Translate([System.Security.Principal.SecurityIdentifier]).value


//Randa Username pagal ssid
$objSID = New-Object System.Security.Principal.SecurityIdentifier `
    ("S-1-5-21-1454471165-1004335555-1606985555-5555")
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])
$objUser.Value

//Importuoti iš čia

From your user you should have exported the key
HKEY_CURRENT_USER\Software\Fortinet\SslvpnClient\Tunnels
which would be "virtual" key of current logged user (it has no data, it just links to current logged user).


//prideda bendra registrą
reg add HKEY_CURRENT_USER\Software\Fortinet\SslvpnClient\Tunnels

//kitas būdas
The location of where new profiles copy their user registry settings is located on the file system at %SystemDrive%\Users\Default\NTUSER.DAT in Windows 7 and Windows Vista, in Windows XP it is located at %SystemDrive%\Documents and Settings\Default User\NTUSER.DAT. Now that we know what file is copied to create all new profile user registry settings we just need a way to edit the settings. Well there’s a tool for that, it’s called Regedit.exe.

The trick with editing the default user profile registry settings is to first know that it is not available in Regedit.exe by default. We will need to load the NTUSER.DAT file into Regedit.exe to be able to edit the settings. Open Regedit.exe by going to Start and typing Regedit, then right-click the search result and select Run as administrator. If you are currently logged on with a non-administrator the User Account Control box will allow you to provide administrative credentials, otherwise click Yes in the UAC box.

When Regedit starts, navigate to HKEY_USERS and left click it.

https://micksmix.wordpress.com/2012/01/13/update-a-registry-key-for-all-users-on-a-system/
http://blogs.technet.com/b/chad/archive/2012/04/25/tip-49-how-do-you-set-default-user-profile-registry-settings.aspx
https://support.microsoft.com/en-us/kb/146050