Jump to content

Can an AutoIt.exe running as Admin start another program "normally"?


Go to solution Solved by ioa747,

Recommended Posts

Posted (edited)

After 25 years using Windows, I'm still a n00b re. accounts or Admin mode in Windows. Only since Win 10 am I in a system with "more safety" and potential hassle (is how I look at it).

So I wanted to copy/move/delete some files from within my utilities.exe AutoIt program.

As some of these files/destinations are in protected folders, the easy solution seemed to run utilities.exe as an Administrator.

However, if my program also starts up, say, Photoshop, this too seems to now run in Admin mode, which seems to cause all kinds of hassle, i.e., a cascade of other software I have to put in Admin mode too for them to still recognize each other.

The ideal for me would be if my utilities.exe (running as Administrator) would be able to start Photoshop "normally."

I have already tried to point to a .bat file starting up Photoshop, but this seems to have the same effect.

As an alternative, I would be equally helped if I could run utilities.exe normally, but have a way to make the copy/move functions work for protected folders.

I guess I could also simply turn off these folder protections, as I don't care for them (nevertheless still hoping it makes life a little safer).

TIA! :)

Edited by Guy_
Posted (edited)

Thanks!

I was there earlier but was overwhelmed by the 137 solutions... ;)

Turns out I remembered the shortcut technique wrongly as using a .bat file. The shortcut technique does work.

shortcut solution

 

Edited by Guy_
Posted

and it doesn't matter what credentials you're running with in Explorer that runs the shortcut?

As soon as you do the test, reply  so we can know too :)

I know that I know nothing

Posted (edited)
43 minutes ago, ioa747 said:

and it doesn't matter what credentials you're running with in Explorer that runs the shortcut?

As soon as you do the test, reply  so we can know too :)

I don't even know what "credentials" would mean here?  I just have one login password into Windows, AFAIK.

I just use this and it works...

Run("explorer.exe " & $_Photoshop_shortcut)
Edited by Guy_
Posted

Or do you mean to try normally and as Admin?

"As Admin" works and I'd say the other option would obviously work too.

I do know it doesn't do the files right if I'm not in Admin mode.

Posted

I believe that this works because by design explorer.exe cannot run with elevated permissions, so you're now launching the program through a non-elevated process. I'm sure that there is some official documentation on why, but I can't really find it. It's just something that I've seen mentioned. There's no credentials or anything, and you'd get the same thing if you started a different AutoIt program without administration and told it to launch another process.

This was one of the suggestions in the linked thread as well, have a script that starts as admin, and one as non-admin, then use some type of IPC or control to tell one of the scripts to launch another program. explorer.exe is just a convenient way to start up something else, and you don't need a shortcut to do it. You can use the full path to the file as well.

We ought not to misbehave, but we should look as though we could.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...