Jump to content

Start app interactively with desktop


Recommended Posts

I am attempting to start an app interactively with the desktop.  With the following code the script just runs until killed.  If I remove the top two lines it runs and finishes but obviously doesn't interact with the desktop.

$cred = (Get-Credential $env:USERNAME)
Enter-PSSession -computerName "$env:computername" -credential $cred

cd $env:userprofile\Desktop


I would be grateful for any suggestions.



Link to comment
Share on other sites

  • Staff

Hi Jim,

If you want to interact with the user's session, then you will need to use the PSexec to access it.

An exam:

psexec \\computer-name -u username -p password /accepteula -i 1 -d "C:\Program Files\Sublime Text 3\sublime_text.exe"


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...