Need help to install software remotely on Mac

Hi
I copied an application to the shred folder on a remote computer.
I run the following command remotely:
open -a /Users/Shared/applicationname.app
This application run and install it self to applications folder, but during installation after run it asks for admin user and password on osascript window.

How can I apply username and password remotely? or
Is there any way to do this remotely?
Or a way to prevent application from asking for user name and password like use a sudo command or run as admin?

Thanks for Help.

Remote Desktop could allow you to access the system and manually complete the installation. I don’t think you’ll navigate around this authentication requirement.

Thanks for reply, I have many computers not one, and I am using filewave.
I just want to use commands or scripts and send blindly.

Understood. FYI, I use Apple Remote Desktop to manage 35 Mac systems here. You can push a .pkg or .mpkg file to all systems for a multi-system touch-less install. Push apps, files, execute terminal commands etc. to multiple systems simultaneously. Handy!

That osascript dialog, looks like a permissions request for the installer to run a script in the terminal via osascript. You have to authorize this and there is no way I’m aware of to automate that authentication.

A different install method by the app developer that doesn’t use osascript would resolve this. Is this installer a signed app?

Did you try to run it via sudo and pass the password? Just a shot in the dark.

Plus, as @paulskinner already mentioned, this could be a permissions request displayed by an installer. Some installers will always require admin permissions if they have to install files into certain locations. I also don’t know if there’s a way to automate such authentication requests without an option for this being built into the installer.