Not a bug.
My Win 10 install was only 5 days old, and since I hadn't logged in as admin yet, there was no admin profile created (thus no Startup folder existed for the admin user). The things you learn!
Still, this is something to be aware of in future: your users may be trying your software on a new user profile, which can cause it to fail or return unexpected results. Now I have to amend all my sources to handle such missing profiles; so not a lost cause by posting about it after all.
Getting Startup folder fails as admin
Getting Startup folder fails as admin
Last edited by BarryG on Thu Aug 29, 2019 8:01 am, edited 4 times in total.
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Getting Startup folder fails as admin
Works fine here with PB 5.71 LTS (x64), running on an admin account on a Windows 10 (version 1903):BarryG wrote:Question 1 of 2:
Code: Select all
recent$=Space(999) : a=0 : SHGetSpecialFolderLocation_(0,#CSIDL_RECENT,@a) : SHGetPathFromIDList_(a,@recent$) startup$=Space(999) : a=0 : SHGetSpecialFolderLocation_(0,#CSIDL_STARTUP,@a) : SHGetPathFromIDList_(a,@startup$) Debug recent$ ; C:\Users\Limited\AppData\Roaming\Microsoft\Windows\Recent Debug startup$ ; C:\Users\Limited\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
So it seems to be a special problem on your Windows system.C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Recent
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
German Windows 10:BarryG wrote:Question 2 of 2:
Can someone who uses a NON-ENGLISH version of Windows 10, please run the following code and tell me what the debug output is?
Code: Select all
smp$=Space(999) : a=0 : SHGetSpecialFolderLocation_(0,#CSIDL_PROGRAMS,@a) : SHGetPathFromIDList_(a,@smp$) Debug smp$
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Re: Getting Startup folder fails as admin
Confirmed. Edited my first post with an explanation.Little John wrote:So it seems to be a special problem on your Windows system.
Thanks! Good to see that the text is in English.Little John wrote:German Windows 10:
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Getting Startup folder fails as admin
That's a pretty special situation. However, our programs must be able to deal with this appropriately. So thank you for bringing this problem to my attention.BarryG wrote:My Win 10 install was only 5 days old, and since I hadn't logged in as admin yet, there was no admin profile created (thus no Startup folder existed for the admin user).
Re: Getting Startup folder fails as admin
Yep, just goes to show that you can't always plan for everything.