Jump to content

Recommended Posts

Posted (edited)
  On 4/29/2021 at 8:44 AM, JockoDundee said:

I looked, but I didn’t find your actual regedit there.

All I saw was a msgbox program that you said to add to my boot up.

Can I use task scheduler with elevated admin?

If not, shouldn’t I use your regedit string?

Expand  

You can compile my sample code and join the startup items, you will understand, it will not execute.

and You can use two ways to join it to boot startup.

 

1. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\

2. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)

Edited by meety
Posted
  On 4/29/2021 at 8:25 AM, caramen said:

If you mean that your issue isn't to run the program at startup but run the program at startup with admin right. 

 

Here also you got multiples ways. The best way for this is task scheduler yeah. 

But you could also use one of my precedent suggestion with one additional step. 

image.png.e83423a7d8dfe38d3dec78a98ebcbab8.png

Right click > Property > compatibility > change parameter > Execute as admin. 

Also, it can prompt you with UAC. If you want to disable UAC prompt.

You can do it with registry or windows interface.  

 

Expand  

thank you!

Posted

Could we have the correct question ? 😅

 

  On 4/29/2021 at 9:21 AM, meety said:

thank you!

Expand  

For us, or at least for me, that mean your issue was solved.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

  Reveal hidden contents

 

  • Developers
Posted
  On 4/30/2021 at 1:21 AM, meety said:

Can I get the correct answer?

Expand  

Which part in all the replies you receive were not correct? You realize this is not the smartest reply when people are trying to help you ...right?
So what about you tell us what you think should happen when you want to run an script at startup with #RequiryAdmin first. What is your expectation?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)
  On 4/30/2021 at 7:52 AM, Jos said:

Which part in all the replies you receive were not correct? You realize this is not the smartest reply when people are trying to help you ...right?
So what about you tell us what you think should happen when you want to run an script at startup with #RequiryAdmin first. What is your expectation?

Jos

Expand  

Hi,Jos 

Nice to meet you!

I have gave up because people didn't seem to understand my question, although I had explained it very clearly.

Edited by meety
Posted
  On 4/30/2021 at 7:52 AM, Jos said:

Which part in all the replies you receive were not correct? You realize this is not the smartest reply when people are trying to help you ...right?
So what about you tell us what you think should happen when you want to run an script at startup with #RequiryAdmin first. What is your expectation?

Jos

Expand  

I say that I found that after using the #RequireAdmin function, after the script is compiled, add it to the system startup items. the program cannot be executed after system boot up.

Can you understand what I mean?

Posted (edited)

Look, you have to do one thing. Just watch my signature. 

" How to ask help " 

 

Just, show us....

Copy past your entire script here. Not only one part. 

 

Cannot be executed ?

Why ?

How ?

What is the problem ?

UAC ?

Not running at all ? 

You got error message ? 

Any screenshot that can help maybe ?

 

We don't have crystal ball skills here. 

 

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

  Reveal hidden contents

 

Posted (edited)

I believe people who know the cause of the problem don’t need to ask other things.

Because I've made it very clear, and I've given the sample code. After you compile it and add it to the system startup items, you can reproduce the problem If you have questions about this. But it's clear that people didn't do it, and people thought I didn't give the real code. So they won't know the cause of the problem.

Edited by meety
Posted (edited)
  On 4/29/2021 at 8:50 AM, meety said:

What is the difference? UAC is closed.

Expand  

What does that mean? It’s off? It’s hard to understand you because you’re not using correct terms and you won’t post your code and you’re being very secretive about what it is you’re doing so people aren’t going to help you

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted (edited)

@meety.  You cannot run directly from startup folder a program that #RequireAdmin.  But you can ShellExecute a second script that includes #RequireAdmin.

Script 1 (must be compiled and copied into startup folder)

ShellExecute("c:\apps\autoit\TempExtra.au3")

Script 2 (uncompiled, called here as TempExtra.au3)

#RequireAdmin
MsgBox(0,"","test")

Working fine for me on Win7. 

ps. you may also need to exclude startup folder from your AV scan (or use a shortcut instead of having the exe physically there)

Edited by Nine
Posted

As far as I know apps that require admin permissions will be ignored on boot!

You will need something called uac bypass, it's done by Task scheduler.

Regards,
 

Posted

I've never used it, I like my program to be able to run anywhere.
1.If there is no need for windows interaction, for example my monitoring program will run as a service on system user.
2. For the application that needs admin rights I use  Task scheduler to set it up
3. The rest will use the reg key.

Regards,
 

Posted

i didnt read any comment here. But to my knowledge windows just doesnt startup any .exe that requires admin. Dont use #RequireAdmin, as windows will just ignore the app then on startup (thats only true to registry startups). You should invoke the UAC prompt on your own.

Take this as an example

_MakeMeAdmin()

Func _MakeMeAdmin()
    if Not IsAdmin() Then
        Local $oShell = ObjCreate("Shell.Application")
        $oShell.ShellExecute(@AutoItExe, @ScriptFullPath, '', 'runas')
        Exit
    EndIf
EndFunc

MsgBox(0, "", "Im Admin")

 

Posted (edited)

I have seen this issue many times. It stems from the fact that disabling UAC stops the prompts for Admin credentials.
This fact leads that user to believe that they have full Admin credentials, and they do not.
Enabling UAC back to its 'Default' setting will cure your headaches.

This advice may not fix your current issue,
but the headaches will slowly subside while you learn to work with Windows instead of against it.

There is NO credible statement from Microsoft stating that disabling UAC elevates that user to have Full Administrative privileges.
Best available information from Microsoft

Edited by Shark007

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...