SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Custom Snippets Lost Upgrading from 4.7 to 4.8

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Custom Snippets Lost Upgrading from 4.7 to 4.8
Author Message
jerichoj



Joined: 02 Nov 2009
Posts: 7
Country: United States

Post Custom Snippets Lost Upgrading from 4.7 to 4.8 Reply with quote
Hello,

I had several custom Snippets created under 4.7.xx and the disappeared when I upgraded to 4.8.xx.

After re-creating some of them, I did some investigation and found a SqlAssist.sas file in the following location:

C:\Users\[MyWindowsLogonName]\AppData\Roaming\SQL Assistant\4.7

I also have folders for 4.6 and 4.8. So, it appears that with each minor revision you create a new set of configuration files, but aren't necessarily importing the configuration from the previous version. However, I appologize that I don't remember which 4.8.xx version I upgraded to from 4.7.xx. I may have gone straight to 4.8.24 (thought not sure if there was a 4.8 prior to 4.8.24).

Just wanted to have you clarify or check it out because I was initially frustrated at losing my custom snippets and having to re-do the work to create them. I wasn't smart enough to copy or export them before the upgrade.

Thanks for your help.
Tue Nov 03, 2009 11:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Yes, the setup saving previous versions as backups and automatically importing them into new versions. But the setup is not looking in roaming profiles. Please change your Vista settings and make it save SAS files in the normal location
Tue Nov 03, 2009 11:45 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Just in case... the Import/Export button on SQL Assistant Options dialog can be used to manually copy settings between SQL Assistant versions and SAS files.
Tue Nov 03, 2009 12:31 pm View user's profile Send private message
jerichoj



Joined: 02 Nov 2009
Posts: 7
Country: United States

Post Reply with quote
Change my Vista setup how???

I don't think I have done anything special to cause this. I didn't do anything custom in the install of SQL Assistant. This is just where I found it.

I have never really understood how Vista (or an application) chooses between "Local", "LocalLow", and "Roaming" under AppData.

I assumed that SQL Assistant chose this location, or queried an environment variable that points there.

Issuing a "SET" command at the cmd prompt, I see that the environment variable "APPDATA" points to the Roaming folder and the "LOCALAPPDATA" environment variable points to the Local folder. I don't know that I have done anything in Vista to specifically cause this or set APPDATA to point to Roaming. To my knowledge, that is the default setting.

Also, looking into the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, I see that "AppData" points to the Roaming folder. So, I assume that if your code is doing a SHGetFolderPath or SHGetKnownFolderPath for AppData (Application Data), you would have gotten the same value.

So, the question is, is the setup installer asking Windows for the same path that SQL Assistant is asking Windows for? Maybe your installer is looking to a hard coded path, which is the Local folder and making an incorrect assumption.

Just a thought.

If it is something I have unwittingly set in Vista by changing some option myself, please let me know.

Thanks
Tue Nov 03, 2009 1:45 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
SQL Assistant always reads/writes to a fixed path. To support multiple users sharing the same system, behind the scenes Vista virtualizes file locations (and registry settings too) and moves files around as its thinks is best for you. For example, a program could write to C:\Users\[MyWindowsLogonName]\AppData\SQL Assistant\4.7 and Windows will then move that file to C:\Users\[MyWindowsLogonName]\AppData\Roaming\SQL Assistant\4.7 or other place depending on how you logon to the system.

That's why your settings and changes sometimes mysteriously disappear after programs are restarted or you just logoff and logon. To avoid getting into this situation, please change settings of your shortcuts for SQL Assistant and whatever SQL editor you use to start as Administrators. There is a checkbox in the shortcut properties for that purpose. In that mode, your changes will be saved permanently and never lost.

Hope this helps.
Tue Nov 03, 2009 2:07 pm View user's profile Send private message
jerichoj



Joined: 02 Nov 2009
Posts: 7
Country: United States

Post Reply with quote
I run Vista with UAC disabled, and my logon account has administrative privelages, so everything runs with Administrative privelages.

Where did I go wrong?
Tue Nov 03, 2009 2:35 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Vista doesn't really care how users login to the system or what their formal account privileges are. By default all non-system and non-service processes are run in a virtualized low-privileged mode, unless you specifically tell Vista you want to run them in Admin mode. Admin mode and being Admin user is not the same thing and unfortunately turning off UAC doesn't change it much. Disabling UAC only helps with removing some annoying never stopping "are you sure…" prompts.
Tue Nov 03, 2009 2:41 pm View user's profile Send private message
jerichoj



Joined: 02 Nov 2009
Posts: 7
Country: United States

Post Reply with quote
Sir,

I am not trying to be difficult, but I disagree with your statement. Vista does care about the privelages of the logged in user AND having UAC disabled does matter.

When UAC is disabled and the logged in user is in the Administrators group, then Vista runs everything just like it was XP, every process I launch has administrative privelages. UAC is not just about the prompts.

I am a software developer and have extensive experience in this topic.

Only with UAC enabled does Vista (and Windows 7) create a user token and an admin token upon login. Only with UAC enabled does Vista (and Windows 7) then run everything you launch under the user token and only launch things under the admin token after prompting and getting permission from the user for things that are either explicitly marked, explicitly started with "Run as administrator", etc, etc.

Try this: With UAC ENABLED, click on Start and type "cmd" and press Enter. You will get a command prompt with a title bar of "C:\Windows\system32\cmd.exe". With UAC DISABLED, do the same thing and you will notice that the title bar says: "Administrator: C:\Windows\system32\cmd.exe" This is an easy indicator that with UAC disabled, everything runs with the privelages you really have upon login. So, if you are in the Administrators group of the machine, you get Administrative mode.

Please check with your programmers. I am guessing that SQL Assistant is asking Windows via API calls (SHGetFolderPath or SHGetKnownFolderPath) "What is the Application Data path for the current user?" And is getting the response of C:\Users\[MyWindowsLogonName]\AppData\Roaming in the case of Vista.

Then, I am guessing that your installer, or whatever bit of code that attempts to import settings from the previous version after install, is either using a hard coded, and incorrect path, or is asking Windows a different question, such as "What is the Local Application Data path for the current user?" which returns C:\Users\[MyWindowsLogonName]\AppData\Local

Whether this issue gets corrected or not, at least I now know where you are storing the data and how to manually get my custom configuration restored.


Last edited by jerichoj on Tue Nov 03, 2009 4:06 pm; edited 1 time in total
Tue Nov 03, 2009 3:37 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Thank you for clarifying the Vista working.

You can easily verify if that works for you in 3 steps. Double-click on SQL Assistant icon in the system tray. Make some changes in code snippets. Close Options to save changes. Note that SQL Assistant saves changes in %APPDATA%\4.8\SQLAssist.sas. Logout and login. Open SQL Assistant Options again. If your changes are still there, you are good, and Admin mode is not needed for the shortcut. If your changes are gone, you then would know that the Admin mode is required for SQL Assistant running.

Now try simulating SQL Assistant upgrade. Find and rename the folder in which SQL Assistant saved its settings with your code changes. Change that folder name from 4.8 to 4.7. Note that you are not going to find this file where it was saved %APPDATA%\4.8\SQLAssist.sas. It is going to be someplace else. Run SQL Assistant setup program. The setup program will try to locate your previous settings, in case 4.8 folder doesn't exist or is empty. The setup internally is going to ask Vista to return path to %APPDATA%\4.7\SQLAssist.sas. As you previous messages indicate, the setup program is not going to find that file, because there is no such folder.


I'd be happy to hear that if it works for you without the Admin mode. It doesn't work this way for many other people.

If you are interested, you can search the web http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-us&q=vista+changes+not+saved+after+restart&aq=f&oq=&aqi= or also search this support board http://www.softtreetech.com/support/phpBB2/search.php?mode=results use Admin for the search term and choose to search SQL Assistant forum.


And by the way, your feedback is much appreciated!
Tue Nov 03, 2009 4:02 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.