TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Cristiana Fernandes
    • Profile
    • Following 1
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 1
    • Controversial 0
    • Groups 0

    Cristiana Fernandes

    @Cristiana Fernandes

    1
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    Cristiana Fernandes Unfollow Follow

    Best posts made by Cristiana Fernandes

    • RE: Laptop Battery Management - Automated On/Off Cycle

      @Russ Everything worked so fine to me but I was worried about the powershell window because it has to be always minimized on your taskbar so I found this article helping hiding it at startup just by adding the following code in the beginning of the script to run it in background:

      # .Net methods for hiding/showing the console in the background
      Add-Type -Name Window -Namespace Console -MemberDefinition '
      [DllImport("Kernel32.dll")]
      public static extern IntPtr GetConsoleWindow();
      
      [DllImport("user32.dll")]
      public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);
      '
      function Hide-Console
      {
          $consolePtr = [Console.Window]::GetConsoleWindow()
          #0 hide
          [Console.Window]::ShowWindow($consolePtr, 0)
      }
      Hide-Console
      
      posted in Example Commands
      Cristiana FernandesC
      Cristiana Fernandes

    Latest posts made by Cristiana Fernandes

    • RE: Laptop Battery Management - Automated On/Off Cycle

      @Russ Everything worked so fine to me but I was worried about the powershell window because it has to be always minimized on your taskbar so I found this article helping hiding it at startup just by adding the following code in the beginning of the script to run it in background:

      # .Net methods for hiding/showing the console in the background
      Add-Type -Name Window -Namespace Console -MemberDefinition '
      [DllImport("Kernel32.dll")]
      public static extern IntPtr GetConsoleWindow();
      
      [DllImport("user32.dll")]
      public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);
      '
      function Hide-Console
      {
          $consolePtr = [Console.Window]::GetConsoleWindow()
          #0 hide
          [Console.Window]::ShowWindow($consolePtr, 0)
      }
      Hide-Console
      
      posted in Example Commands
      Cristiana FernandesC
      Cristiana Fernandes