mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Added privacybar console command for Windows, to modify default pinned state
This commit is contained in:
		
							parent
							
								
									51e0adc7d8
								
							
						
					
					
						commit
						579eb704a7
					
				
					 1 changed files with 34 additions and 0 deletions
				
			
		|  | @ -3351,6 +3351,7 @@ function processConsoleCommand(cmd, args, rights, sessionid) { | |||
|                 { | ||||
|                     availcommands += ',cs,wpfhwacceleration,uac,volumes'; | ||||
|                     if (bcdOK()) { availcommands += ',safemode'; } | ||||
|                     if (require('notifybar-desktop').DefaultPinned != null) { availcommands += ',privacybar'; } | ||||
|                 } | ||||
|                 if (amt != null) { availcommands += ',amt,amtconfig,amtevents'; } | ||||
|                 if (process.platform != 'freebsd') { availcommands += ',vm'; } | ||||
|  | @ -3366,6 +3367,39 @@ function processConsoleCommand(cmd, args, rights, sessionid) { | |||
|                 response = "Available commands: \r\n" + fin + "."; | ||||
|                 break; | ||||
|             } | ||||
|             case 'privacybar': | ||||
|                 if (process.platform != 'win32' || require('notifybar-desktop').DefaultPinned == null) | ||||
|                 { | ||||
|                     response = 'Unknown command "privacybar", type "help" for list of avaialble commands.'; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     switch(args['_'].length) | ||||
|                     { | ||||
|                         default: | ||||
|                             // Show Help
 | ||||
|                             response = "Current Default Pinned State: " + (require('notifybar-desktop').DefaultPinned ? "PINNED" : "UNPINNED") + '\r\n'; | ||||
|                             response += "To set default pinned state:\r\n  privacybar [PINNED|UNPINNED]\r\n"; | ||||
|                             break; | ||||
|                         case 1: | ||||
|                             switch(args['_'][0].toUpperCase()) | ||||
|                             { | ||||
|                                 case 'PINNED': | ||||
|                                     require('notifybar-desktop').DefaultPinned = true; | ||||
|                                     response = "privacybar default pinned state is: PINNED"; | ||||
|                                     break; | ||||
|                                 case 'UNPINNED': | ||||
|                                     require('notifybar-desktop').DefaultPinned = false; | ||||
|                                     response = "privacybar default pinned state is: UNPINNED"; | ||||
|                                     break; | ||||
|                                 default: | ||||
|                                     response = "INVALID parameter: " + args['_'][0].toUpperCase(); | ||||
|                                     break; | ||||
|                             } | ||||
|                             break; | ||||
|                     } | ||||
|                 } | ||||
|                 break; | ||||
|             case 'domain': | ||||
|                 response = getDomainInfo(); | ||||
|                 break; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue