craigegross
Member
- Messages
- 9
- Reaction score
- 0
- Points
- 1
We are trying to create an app that is deployed to our environment that will users to map to print servers/printers at their location without needing elevated privileges to complete.
We have three PowerShell scripts to achieve this. Our PowerShell guru has made some awesome scripts for this.
Script 1 - run as the user and calls a form that the user completes to determine the print server and print devices. It then attempts to install that device for the user. If it is successful then a pop up is displayed to show the printer was installed. If the printer could not be installed then an output file is created and the user doesn't see anything.
Script 2 - runs as the system. The user doesn't see anything from this script running. It attempts to install the printer as the system (so no elevation required).
Script 3 - runs as the user and copies the mapped printer to the user's profile. If the map is successful, then a popup is displayed showing that. If it is unsuccessful, a popup will show what happened.
My questions are:
1. How do we make the app stop running if Step 1 is successful and show as successful in Software Center.
2. When step 1 fails, how do we ensure steps 2 and 3 are run?
3. Any suggestions for optimization?
We have three PowerShell scripts to achieve this. Our PowerShell guru has made some awesome scripts for this.
Script 1 - run as the user and calls a form that the user completes to determine the print server and print devices. It then attempts to install that device for the user. If it is successful then a pop up is displayed to show the printer was installed. If the printer could not be installed then an output file is created and the user doesn't see anything.
Script 2 - runs as the system. The user doesn't see anything from this script running. It attempts to install the printer as the system (so no elevation required).
Script 3 - runs as the user and copies the mapped printer to the user's profile. If the map is successful, then a popup is displayed showing that. If it is unsuccessful, a popup will show what happened.
My questions are:
1. How do we make the app stop running if Step 1 is successful and show as successful in Software Center.
2. When step 1 fails, how do we ensure steps 2 and 3 are run?
3. Any suggestions for optimization?