Jump to content

@StartUpCommonDir -- internal logic


CarlD
 Share

Recommended Posts

How does @StartUpCommonDir identify the folder to which it points? On my system, it points to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup", while for another user who is testing my script, it points to "C:\Users\{USERNAME}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup", even though the other directory also exists on his system. Can someone please explain the built-in logic that leads to these different results? Thanks in advance.

Link to comment
Share on other sites

I don't have your answer.

Exit MsgBox(0, @ScriptDir,  '@StartUpCommonDir: ' & @CR & @StartUpCommonDir & @CR & @CR & '@StartupDir: ' & @CR &  @StartupDir, 30)

but the above code runs fine on every Win10 so far. Would you have more details of the tester's OS ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

3 minutes ago, argumentum said:

I don't have your answer.

Exit MsgBox(0, @ScriptDir,  '@StartUpCommonDir: ' & @CR & @StartUpCommonDir & @CR & @CR & '@StartupDir: ' & @CR &  @StartupDir, 30)

but the above code runs fine on every Win10 so far. Would you have more details of the tester's OS ?

I'll see if I can get some more details about his OS. And I'm not suggesting that @StartUpCommonDir ever points to a non-existent directory (clearly that would be a problem!) -- although in my tester's system @StartUpDir does not exist, which is why I modified the script to fall back to @StartUpCommonDir in that case. My question really relates to documenting my script. I could say, "If '{systemdrive}:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup' does not exist on your system, the file will be saved to the directory identified by AutoIt's @StartUpCommonDir macro", but that would not provide meaningful information for AutoIt-unaware users. I'd like to document the fallback directory more concretely -- hence my question.

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
 Share

×
×
  • Create New...