Mapping Drive with Prompt/Adding Printer and Drivers

Hey all!

New here, so I apologize in advance for anything ridiculous I’m sure to ask, but was wondering if anyone had experience in creating a script that does this:

  1. Maps a network share with a login prompt.
  2. Detects what OS the computer has.
  3. Installs printer drivers based on OS (along with finishing options for the MFD).
  4. Installs the print object as well as presets.

I work at a University and we require our students to upload jobs to a print server (Papercut) and they absolutely hate it and would rather print directly to the object. We’ve tried writing out directions to have them add the printers themselves and at least 80% of them end up coming to the HelpDesk to have us do it for them.

Any thoughts would be appreciated (OR just tell me this is a ridiculous request)!

Thanks all!

This is just a basic example, you can do things like store the username and/or password locally and autofill it as defaults in the dialogs, save it in keychain, use the system UI to ask for username and password instead of doing it yourself, put in more error handling, there is a lot more you might want. But basically:

tell application "Finder"
	set serverPath to "[whatever the serve path is]"
	set userName to the text returned of (display dialog "Please enter your username for the server." default answer "" buttons {"Submit", "Cancel"} default button "Submit")
	set userPassword to the text returned of (display dialog "Please enter your password for the server." default answer "" buttons {"Submit", "Cancel"} default button "Submit")
	set openServerLink to "smb://" & userName & ":" & userPassword & "@" & serverPath
	open location openServerLink
end tell
  1. Detects what OS the computer has.
set macOSversion to system version of (system info)
  1. Installs printer drivers based on OS (along with finishing options for the MFD).
    Where are the print drivers and how are they installed? Do you have URL’s for the computer to download them based on the OS version, or copy them off a network share, and then you just run an installer? Or do you need it to automate adding them through Printers & Scanners in System Preferences? The prior cases are almost certainly possible, no idea about the later case.

  2. Installs the print object as well as presets.
    Sorry, no idea what a print object is.