Jump to content

Paul

Administrators
  • Posts

    1758
  • Joined

  • Last visited

Everything posted by Paul

  1. Hello, You can use Maintenance Schedule to do just that. You set your working hours for notifications (Use Dashboard app or Group Policy to provision your machines) in a way that you will only receive notifications in that time. Using PC Monitor Manager go to System tab then Notification Schedule subtab. Tick only the hours you are not at work. Please note that while in maintenance mode no notifications will be delivered. If you need something based on operator consider using Pagerduty services. Hope this helps, Paul
  2. Hello bencook, Most likely your motherboard chipset is not publishing that particular information. SpeedFan may use proprietary API to get the fan speed of your system fan. PC Monitor is constantly updating it's hardware compatibility so keep an eye on releases to see when the Hardware monitoring library receives an update.
  3. Hello, Unfortunately you cannot recover PC Monitor's settings from the files under the "program files" directory. PC Monitor stores it's configuration in Windows Registry (type regedit in run to browse). PC Monitor Root Key: HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor Why not recreate the configuration from scratch. It's not really hard to configure it. You can also get help by consulting the user manual here. Good Luck, Paul.
  4. Plus one for this. This can help identify memory leaks before they eat up the whole memory on the server.
  5. Hello, You are suggesting higher prices than they already are. 9€ for one license is a great price, however there is a minimum of five computers you can monitor. As far as I know Mobile PC Monitor doesn't support accounts with free and subscription based licenses. I may be the wrong person to ask so why not contact sales to see what they have to say about this. (sales at mobilepcmonitor dot com) Good luck
  6. Keep in mind that a device can receive notifications from only one account.
  7. Can you also share your instance specs too? It would help others link a price to a number of concurrent connections.
  8. Or you could use a monitored PC on your server to monitor server's SSL certificate. You will receive more than one notification.
  9. Hello, This was already discussed here: http://forum.pulseway.com/topic/737-automaticly-add-new-computers/ . Consider leaving a comment there if you would like to add something. Paul.
  10. The ability of changing (add, edit or remove) configured scripts on the fly using the mobile app or web app would be awesome. I can download the scripts using command line from mobile app and then using your plugin it would be awesome to be able to map the new scripts and use them without having to leave the mobile app . Should be fun to code.
  11. Hello Andrew, Can you successfully install PC Monitor on your server? Can you configure it? If you press "Validate Account" do you get any errors? Does the PC Monitor service start if you click on "Start Service" button in the left side of the PC Monitor Manager application? If not, do you get an error message? Please reply to each of the four questions and I will do my best to help you. Paul.
  12. Paul

    Deleted Computer

    Hello Branooo, If you removed the computer using a mobile client or Windows 8 application then you just need to start the computer again and if the PC Monitor service starts you should see the computer back on the list. On the other hand, if you removed the computer by uninstalling PC Monitor from the computer you must reinstall it and reconfigure your account to get it back on your computer list. Hope this helps, Paul.
  13. Hello Valdiva, It seems that you are not the only user of the computer. If your system administrator has deployed an application to your computer most likely he made sure that you will not be able to uninstall it. Recommended uninstall method of PC Monitor on a Windows Computer: Go to Control Panel (control in Start -> Run) Open Programs and Features (appwiz.cpl in Start -> Run) Double click on PC Monitor and confirm on the dialog that you wish to remove PC Monitor. Manual uninstall method of PC Monitor on a Windows Computer: Open Command Prompt (cmd in Start -> Run) Type in command prompt with the quotes included: sc delete "PC Monitor" Delete the folder located at: WindowsDrive\Program Files (x64)\PC Monitor on an x64 system or WindowsDrive\Program Files\PC Monitor on a x86 system. If you need support on uninstall other software use PC Monitor mobile client to uninstall them or contact the support of the application manufacturer. Good luck, Paul.
  14. Then change the monitor interval to 5 minutes so that the rule has time to restart the service before the first notification get's sent.
  15. Hello Kurt, From the User Manual at page 53 you can see that you can activate service downtime notifications from PC Monitor Manager -> Notifications Tab -> Performance Subtab -> "Send a notification with the service has stopped or has not started for x minutes". Paul. Edit: Regarding your second question, you should disable the notification when the rule starts and leave the service downtime notification. This way the following things will happen: Service stopped Rule gets fired Batch executes Service starts If service remains up no notification will be sent, if service stays down a notification will be sent because of the service downtime notification that checks every x minutes as configured.
  16. As far as I know PC Monitor release dates are not announced so when an update is release you will see it in the forum and social media. I'm not sure what feature you want to see into PC Monitor, launch mstsc from web app or execute code on webapp? If so I highly doubt this will happen because it will pose a great security risk on users.
  17. I've replied in your original thread with a solution. Check it out. .
  18. You can do a RDP connection using PC Monitor Dashboard using the context menu. Don't get it wrong. Plugins and cloud instances are very useful when used properly. In your case you want a client side plugin which is not supported (well at least at the moment).
  19. Here is the code that gets your public IP address of the current computer: public string GetPublicIPAddress() { var request = (HttpWebRequest) WebRequest.Create("http://checkip.dyndns.org"); request.Method = "GET"; WebResponse response = null; StreamReader reader = null; try { response = request.GetResponse(); // ReSharper disable AssignNullToNotNullAttribute reader = new StreamReader(response.GetResponseStream()); // ReSharper restore AssignNullToNotNullAttribute var result = reader.ReadToEnd(); result = result.Remove(0, result.IndexOf("Address:", StringComparison.Ordinal) + 9); return result.Remove(result.IndexOf("</body>", StringComparison.Ordinal)); } catch { return "127.0.0.1"; } finally { if (reader != null) { reader.Close(); reader.Dispose(); } if (response != null) response.Close(); request.Abort(); } } Note: You may need some using statements (try pressing CTRL + . (dot) ) on the red types, or right click -> resolve -> select namespace. This code gets the IP address using a free online service that returns your IP address (http://checkip.dyndns.org). It does not return the IP address of other monitored computers . It will always be the IP address of the machine the code executes from. Good Luck, Paul.
  20. Good morning Kurt, On my last reply I've told you that code will never execute on the client side ( your laptop ) but on the system that hosts your plugin. I will post the code that will get your external IP address when I get to work.
  21. External IP is not exposed by the pc monitor api. Btw your code to execute a process was fine but microsoft decided to make a developer's life a pain while working under a windows service. If you can wait 9 hours until I wake up and I am at work I will post a method that returns your public IP address.
  22. While reading your replies made me realize you want a plugin on a computer change the bahavior and execute a process on the client computer / device. This is not supported and it is very dangerous if it would be. What if I share with you a computer that has a script that can download and execute a rootkit on your computer just by clicking on my plugin? Mobile PC Monitor doesn't do any code injection on client devices / computers. Plugins can only execute on the machines they are installed.
  23. Oops: I forgot to update the namespace on the class. Change the namespace on the new class to match yours: Plugin1 -> RemoteSupport Paul.
  24. Hello Kurt, Add this class to your project: using System; using System.Runtime.InteropServices; namespace Plugin1 { public static class Win32 { [StructLayout(LayoutKind.Sequential)] private struct Security_Attributes { public Int32 Length; public IntPtr lpSecurityDescriptor; public Boolean bInheritHandle; } private enum Token_Type { TOKEN_PRIMARY = 1, TOKEN_IMPERSONATION = 2 } [StructLayout(LayoutKind.Sequential)] private struct Startupinfo { public Int32 cb; public String lpReserved; public String lpDesktop; public String lpTitle; public UInt32 dwX; public UInt32 dwY; public UInt32 dwXSize; public UInt32 dwYSize; public UInt32 dwXCountChars; public UInt32 dwYCountChars; public UInt32 dwFillAttribute; public UInt32 dwFlags; public short wShowWindow; public short cbReserved2; public IntPtr lpReserved2; public IntPtr hStdInput; public IntPtr hStdOutput; public IntPtr hStdError; } [StructLayout(LayoutKind.Sequential)] private struct Process_Information { public readonly IntPtr hProcess; public readonly IntPtr hThread; public readonly UInt32 dwProcessId; public readonly UInt32 dwThreadId; } private enum Security_Impersonation_Level { SECURITY_ANONYMOUS = 0, SECURITY_IDENTIFICATION = 1, SECURITY_IMPERSONATION = 2, SECURITY_DELEGATION = 3, } private const UInt32 MAXIMUM_ALLOWED = 0x2000000; private const Int32 CREATE_UNICODE_ENVIRONMENT = 0x00000400; private const Int32 NORMAL_PRIORITY_CLASS = 0x20; private const Int32 CREATE_NEW_CONSOLE = 0x00000010; [DllImport("kernel32.dll", SetLastError = true)] private static extern Boolean CloseHandle(IntPtr hSnapshot); [DllImport("kernel32.dll")] public static extern UInt32 WTSGetActiveConsoleSessionId(); [DllImport("Wtsapi32.dll")] private static extern UInt32 WTSQueryUserToken(UInt32 sessionId, ref IntPtr phToken); [DllImport("advapi32.dll", EntryPoint = "CreateProcessAsUser", SetLastError = true, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] private static extern Boolean CreateProcessAsUser( IntPtr hToken, String lpApplicationName, String lpCommandLine, ref Security_Attributes lpProcessAttributes, ref Security_Attributes lpThreadAttributes, Boolean bInheritHandle, Int32 dwCreationFlags, IntPtr lpEnvironment, String lpCurrentDirectory, ref Startupinfo lpStartupInfo, out Process_Information lpProcessInformation); [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] private static extern Boolean DuplicateTokenEx( IntPtr existingTokenHandle, UInt32 dwDesiredAccess, ref Security_Attributes lpThreadAttributes, Int32 tokenType, Int32 impersonationLevel, ref IntPtr duplicateTokenHandle); [DllImport("userenv.dll", SetLastError = true)] private static extern Boolean CreateEnvironmentBlock( ref IntPtr lpEnvironment, IntPtr hToken, Boolean bInherit); [DllImport("userenv.dll", SetLastError = true)] private static extern Boolean DestroyEnvironmentBlock(IntPtr lpEnvironment); /// <summary> /// Creates the process in the interactive desktop with credentials of the logged in user. /// </summary> public static void CreateProcessAsUser(String commandLine, String workingDirectory = null) { var dwSessionId = WTSGetActiveConsoleSessionId(); var hUserToken = IntPtr.Zero; WTSQueryUserToken(dwSessionId, ref hUserToken); var sa = new Security_Attributes(); sa.Length = Marshal.SizeOf(sa); var hUserTokenDup = IntPtr.Zero; DuplicateTokenEx( hUserToken, (Int32) MAXIMUM_ALLOWED, ref sa, (Int32) Security_Impersonation_Level.SECURITY_IDENTIFICATION, (Int32) Token_Type.TOKEN_PRIMARY, ref hUserTokenDup); if (hUserTokenDup != IntPtr.Zero) { var dwCreationFlags = NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE; var pEnv = IntPtr.Zero; if (CreateEnvironmentBlock(ref pEnv, hUserTokenDup, true)) dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT; else pEnv = IntPtr.Zero; // Launch the process in the client's logon session. Process_Information pi; var si = new Startupinfo(); si.cb = Marshal.SizeOf(si); si.lpDesktop = "winsta0\\default"; CreateProcessAsUser(hUserTokenDup, // client's access token null, // file to execute commandLine, // command line ref sa, // pointer to process SECURITY_ATTRIBUTES ref sa, // pointer to thread SECURITY_ATTRIBUTES false, // handles are not inheritable dwCreationFlags, // creation flags pEnv, // pointer to new environment block workingDirectory, // name of current directory ref si, // pointer to STARTUPINFO structure out pi // receives information about new process ); DestroyEnvironmentBlock(pEnv); } CloseHandle(hUserTokenDup); CloseHandle(hUserToken); } } } Then in your application delete the page command received with command received (Only use page command received for commands received from a PageItem). Use this code: public override void CommandReceived(int commandId) { if (commandId == 1) Win32.CreateProcessAsUser(@"C:\Windows\System32\mstsc /v:10.0.8.5", @"C:\Windows\System32"); } I didn't test this code on a machine with multiple sessions. I have no idea how it will manifest then. Let me know if you need further help. Paul.
  25. Hey Kurt, I will update your code with a working version. I will post back when I finished. Give me an hour. Thanks..
×
×
  • Create New...