computergroove

Windows 8.1 wont let me start my script on startup

5 posts in this topic

I am trying to start my script on Windows startup and it doesn't run. I have disabled defender and smartscreen with no luck. There is no antivirus on this machine. I have added the script to shell:startup, shell:common startup and HKLM\Software\Microsoft\Windows\Current Version\Run all with no luck. Im at a loss. Please help.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

anything in the event log?

also, how do you know your script does not start? perhaps it starts, and as far as the OS is concerned, everything is OK, but the script crashes because some dependency is not available yet?

EDIT: if its just your machine, then just swallow the Win10 frog.

Edited by orbs

Share this post


Link to post
Share on other sites

I can start my script's compiled exe by double clicking it. I can see the autoit's default tray icon opening in the taskbar next to the time. When I restart the computer the icon does not show up nor does the actions the script is supposed to do occur. Are you saying it is not possible to do this in windows 8? Just upgrade to windows 10 and this will work?


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

6 hours ago, computergroove said:

Are you saying it is not possible to do this in windows 8? Just upgrade to windows 10 and this will work?

no. i'm saying that if you already made the switch from Windows 7, then complete it to Windows 10. Windows 8 has no future, and if you need peer support, the odds are people are running 10 and not 8. i know i have a VM of 10, used to have a VM of 8, not gonna rebuild it anytime soon.

now back to the issue. let's start simple: anything in the event log?

also, the Autoruns utility may be helpful here. it does not provide troubleshooting info, but it can tell you if your entry is configured properly.

EDIT: some interesting links:

http://superuser.com/questions/834135/why-some-startup-programs-not-starting-at-windows-startup

http://www.eightforums.com/performance-maintenance/11216-startup-programs-wont-start-post408148.html?s=f79034567982e147b1cd0b030c7de627#post408148

so perhaps it is actually solved by upgrading to Windows 10... ;)

 

Edited by orbs

Share this post


Link to post
Share on other sites

#5 ·  Posted

I got this to work by making a .bat file and adding it to the shell:startup folder. It works now. No idea why this is necessary. 


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
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

  • Similar Content

    • ces1a
      System Uptime on Windows10
      By ces1a
      I was looking for a way to find out how long my PC had been running a few weeks ago and had trouble finding something that satisfied my needs,  I found a Visual Basic Script that worked but found it too long. But searching trough AutoIt WINAPI help found that it really was as simple as the following little script.
      #include <WinAPISys.au3>
      #include <WinAPIMisc.au3>
      Local $Uptime = _WinAPI_StrFromTimeInterval(_WinAPI_GetTickCount())
      MsgBox(0, '', "PC Uptime ==> " & $UpTime)
      Hope it helps...
    • Natulux
      Script takes ages on startup
      By Natulux
      Hey everyone,
      I have written a script which I want to start together with the booting operating system (Win7x64). Like proposed by wiki-FAQ (https://www.autoitscript.com/wiki/FAQ) I tried the following:
       
      MsgBox(0,"TellMe",RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ATOSS-FavoritenManager", "REG_SZ", @ScriptFullPath)?"SUCCESS":"Error: " & @error) It worked, just like putting a link into the windows autostart directory.
      Thing is, every other program in there needs some seconds to start after booting. However, my script takes 3-5 minutes for no obvious reason, with the process visible in the task-manager. I tried a a smaller Autoit.exe script and it was way faster than mine.
      My script is 1.1MB in size and needs 17.6MB of RAM when running. (maybe that's the problem?)
      I set up a MsgBox at the start of my script to have something simple as first visible effect, so in my opinion it's nothing in my code causing the problem (like a loop).
      My includes are:
      That's quite some but I need those.

      Any ideas? (Here is some code, that my script starts with. Altogether it's about 3500 lines of code.)
       
      Thanks and have a great weekend!
      Natulux
    • iamtheky
      New Powershell Modules (DISM / CIM)
      By iamtheky
      *Requires Win 8 or higher, unless there is someway to import the DISM module in lower versions I am unaware of.
      As my last thread of powershell efforts was aimed at AD, so this one will be aimed at the DISM module available in Win 8 and above.  Lets begin:
      This is the DISM image info command, via powershell, returning an array.
      #RequireAdmin #include <AutoItConstants.au3> #include <Array.au3> $sImagePath = 'C:\Users\username\Desktop\WIMs_2008\install.wim' $sCommands = "powershell get-WindowsImage -ImagePath " & $sImagePath $iPID = run($sCommands, "", @SW_HIDE , $stdout_child) $sOutput = "" While 1 $sOutput &= StdoutRead($iPID) If @error Then ExitLoop EndIf WEnd $aOutput = stringsplit($sOutput , @CR , 2) For $i = ubound($aOutput) - 1 to 0 step - 1 If stringleft(stringstripws($aOutput[$i], 1) , 1) = "" Then _ArrayDelete($aOutput, $i) Next _ArrayDisplay($aOutput)  
    • WoodGrain
      Updating menu items on event
      By WoodGrain
      Hi guys,
      I'm using this startup example to allow the program menu to insert an option to "AutoStart" the script. What I'd like to do is update the checkbox of the menu item after they click it to then reflect the "AutoStart" state (on or off).
      How do I update the menu on the event someone clicks the menu option? The registry is updating correctly, and if I close and re-run the script the menu is updated, but not in the same script execution. I wasn't sure with TrayItemSetState for my "Func AutoStart()" Function what the "controlID" was. I tried 0 through to 3 and "AutoStart" text. Perhaps this is where I'm going wrong?
      ; Add custom tray icon menu #NoTrayIcon #include <MsgBoxConstants.au3> #include <TrayConstants.au3> Opt("TrayMenuMode", 3) Opt("TrayOnEventMode", 1) #include '_Startup.au3' TrayCreateItem("AutoStart") TrayItemSetOnEvent(-1, "AutoStart") If _StartupRegistry_Exists() Then TrayItemSetState(-1, $TRAY_CHECKED) Else TrayItemSetState(-1, $TRAY_UNCHECKED) EndIf TrayCreateItem("About") TrayItemSetOnEvent(-1, "About") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "ExitScript") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "About") TraySetState($TRAY_ICONSTATE_SHOW) ; ################## ; ### OTHER CODE ### ; ################## Func About() MsgBox(0,"About","etc") EndFunc Func AutoStart() If _StartupRegistry_Exists() Then _StartupRegistry_Uninstall() TrayItemSetState("AutoStart", $TRAY_UNCHECKED) Else _StartupRegistry_Install() TrayItemSetState("AutoStart", $TRAY_CHECKED) EndIf EndFunc Func ExitScript() Exit EndFunc Thanks!
    • Rickname
      Is AutoIt compatible with Windows 8.1 ?
      By Rickname
      I want to switch from Windows 7 to Windows 8.1 ( x86 ) but I still want to code in AutoIt. Now I saw in the Description file that is only compatible upto Windows 7, but will it work also on 8 ? And yes Im referring to the latest Autoit version available !