Popup message

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 5 months ago.

  • Author
    Posts
  • #5169

    by shizzledizzle at 2012-10-04 13:01:56

    Currently a PS script is runs at login on terminal servers which maps printers according to the users group membership. Which works well, but can be slow due to the amount of printers users could potentially be mapping. There needs to be a message which pops up when the script starts... Stating something like, "Please be patient while the script runs". When the script completes the message then needs to close.
    Attempts with popups work but fail to meet the exact needed resolution: message shows when script starts and closes when script completes.
    Present config:
    Script 1 runs a popup message which lasts for 300 seconds:
    $a = new-object -comobject wscript.shell
    $b = $a.popup(“Please be patient while your printers are mapping.“,300,”Please Wait for the Printer mappings to complete ”,1)

    Script 2 starts simultaneously mapping printers, then placed at the end of the script is a popup stating the mapping has completed and lasts for 30 seconds.
    $a = new-object -comobject wscript.shell
    $b = $a.popup(“Your printers are set“,30,”Your Printers have completed mapping”,1)

    While this works it requires user interaction... attempts with balloon messages and forms have similar results. Any assistance would be appreciated.

    by JeffH at 2012-10-04 13:36:23

    Why should the second popup need user interaction? It will dismiss after 30 seconds. PowerShell can only run in a single thread so using two scripts is kinda clever to work around this. But there really isn't a way with the popup. Could you use Write-Progress so the user would at least know what is happening? Barring that, I'd suggest seeing if you can get out of using a script altogether and see if Group Policy preferences will work here.

    by shizzledizzle at 2012-10-08 06:21:36

    This will eventually grow to roughly 50 sites, 1000 users, and over 300 printers with the customers and printers doing very specific functions. I was thinking of just mapping all printers and only grant permissions to the printers the customer will be using that way they will only see the printers they have permissions to... but that will be a monster task. Same goes for GPO's that is why I went the script route. Thanks for the ideas I will keep plugging away:)

You must be logged in to reply to this topic.