// Run a program in the session
Run a program in the session
// Run a program in the session
func (s session) Run(program string, args ...string) error {
	var newArgs string
	for _, arg := range args {
		newArgs += fmt.Sprintf("'%s', ", arg)
	}
	newArgs = strings.TrimSuffix(newArgs, ", ")
	_, err := s.session.Execute(fmt.Sprintf("Start-Process -FilePath '.\\%s' -ArgumentList %s -NoNewWindow", program, newArgs))
	return err
}
func ( s session ) Run ( program string , args ... string ) error { var newArgs string for _ , arg := range args { newArgs += fmt . Sprintf ( " " , arg ) } newArgs = strings . TrimSuffix ( newArgs , " " ) _ , err := s . session . Execute ( fmt . Sprintf ( " \\ " , program , newArgs ) ) return err }
Run a program in the session
Run a program in the session