Program called by PS-script don't accept drag and drop

Hello,
I wrote a ps-skript that starts all my needed programms in windows 10 at ones.
( & program.exe / start-process -path program.exe)
So far so good, it works but:
i.e Outlook started that way doesn’t allows me to drag files into a message as it
does, when I start outlook outsite a script.

Can annyone explain to me, how I can get rid of this issue?

Thanks in advanced
Roni

Roni,
welcome to the forum.

I cannot reproduce the behaviour you describe. Outlook works for me the same no matter how I started it. The issue you have may not be caused by PowerShell.

Hello Olaf,

it doesen’t show up if you run the command directly in power shell, it only
appears, when I run a script ( with admin rights).

Thanks for your answer
Roni

What does not show up? Please have in mind we cannot see your screen and we cannot read your mind. You will have to me more explicit and descriptive.

Hello Olaf,

I wrote a script wich contains the entry “& Outlook.exe”
When I run this script by C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy ByPass -NoExit -file “G:\08-Scripte\Start Work.ps1”
Outlook will be open as expected.
Now I click on new email. If I try to drag a entry of the Explorer into the content area of the new massage,
the cursor is tunning into a “not allowed sign” and I can not drop the file.

If I start Outlook in anny other way, I can drop a file into this new massage.

The same is true for anny other Program I start with this script, that allows drag and drop.

I hope, I was able to explain, what I wont to get work.

Cheers
Roni

Roni,

in your last answer you wrote something about “(with admin rights)”. If you start the script in another context it is feature by design when you cannot drop something from your user session into the admin session. If you do actually start the script “with admin rights” … why?

Hallo Olaf,

at the top of the script I switch the appropriate NIC active.
This step needs the admin rights.

I start the script with a short-cut. That short-cut has the flag “run as administrator”

Since you pointed me to the admin rights I did some test.
It seems you were right with it has not to do with power shell.
During those tests every thing works fine.

So maybe I start the script to early after booting windows…

How ever, thank you very much for your assitance.
Roni

You could try killing explorer and starting it from the elevated prompt, assuming it’s still the same user that’s elevated