Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) UserID from environment? (Read 3762 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: UserID from environment?
Reply #15 - Apr 19th, 2005 at 9:46pm
Print Post Print Post  
Quote:
A couple of others that would be helpful would be 
%HOMEPATH% and
%USERPROFILE% 
What do you want to do with these values?  i could write them to a file but that is what happens with the function* that I submitted.

The utility I am working on is not using SBasic so I am not using the Sesame program.  I can still pick them up, but don't know what to do with them. 

But you might be better off after the login, to just use the GetEnvironmentValue function*
Try it out and see how it works for you.  You could put the function in the Open Application programming and make global values from the result.

gblHomePath = fnGetEnvVariable("HOMEPATH"), and
gblUserProfile = fnGetEnvVariable("USERPROFILE")

*I added the function to forum section for Programming Examples, under the subject: Get Environment Variable Value as a general purpose function, as noted earlier.
« Last Edit: Jun 20th, 2006 at 12:01am by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: UserID from environment?
Reply #16 - Apr 21st, 2005 at 7:38pm
Print Post Print Post  
Hello albeamer

I have just sent you a beta copy of my Sesame Login Utility.

Instructions for installation are in the email.

It is designed to start Sesame, pick up the USERNAME from the Windows environment and enter the User Name into the login window for Sesame.  It ends and stops at the password field, waiting for data entry as normal.

A window pops up, defaults to titleworx.db, but has a browse button that starts in your current C:\Sesame\Data folder, and filters and only shows *.db files.  This should help prevent users from openong *.dsr files if you keep them in the same folder.

If you type in bad information, you will get an error message back from Sesame that it was unable to find/open the database.

If you select a database that does not have security, then Sesame will open and the Login Utility window will pop up again in 5 seconds.  Just click on Cancel to close it.

Try it, and let me have some feedback.

==================================
Edited:  Just got a message that the email was sent to unknown user.  Please update your email info on the forum and/or send an email to me directly with correct info.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print