It is currently Sun Mar 29, 2020 3:31 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Getting Startup folder fails as admin
PostPosted: Thu Aug 29, 2019 2:33 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 654
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. :wink:


Last edited by BarryG on Thu Aug 29, 2019 8:01 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Startup folder fails as admin
PostPosted: Thu Aug 29, 2019 6:37 am 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3792
Location: Berlin, Germany
BarryG wrote:
Question 1 of 2:

Code:
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

Works fine here with PB 5.71 LTS (x64), running on an admin account on a Windows 10 (version 1903):
Quote:
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Recent
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

So it seems to be a special problem on your Windows system.



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:
smp$=Space(999) : a=0 : SHGetSpecialFolderLocation_(0,#CSIDL_PROGRAMS,@a) : SHGetPathFromIDList_(a,@smp$)
Debug smp$

German Windows 10:
Quote:
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Startup folder fails as admin
PostPosted: Thu Aug 29, 2019 7:43 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 654
Little John wrote:
So it seems to be a special problem on your Windows system.

Confirmed. Edited my first post with an explanation.

Little John wrote:
German Windows 10:
C:\Users\LJ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Thanks! Good to see that the text is in English.


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Startup folder fails as admin
PostPosted: Thu Aug 29, 2019 12:50 pm 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3792
Location: Berlin, Germany
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).

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

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting Startup folder fails as admin
PostPosted: Thu Aug 29, 2019 1:12 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 654
Yep, just goes to show that you can't always plan for everything.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: TassyJim and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye