Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Environment Variables

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2008, 03:10 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default Environment Variables

In the desktop build, I'm trying to use the likes of %USERPROFILE% and its not working. I know with those environment variables you can find out the username (as in user-id), but there's a persons full name that I'd prefer to grab if anyone can help. Is it a registry call?
Reply With Quote
  #2 (permalink)  
Old 05-22-2008, 03:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The door library comes to the rescue:
obj is an Object.
Code:
Sub App_Start
    Form1.Show
    obj.New1(
false)
    obj.CreateNew(
"System.Environment")
    fullPath = GetPath(
"%USERPROFILE%")
    
Msgbox(fullPath)
End Sub

Sub GetPath (env)
    
Return obj.RunMethod2("ExpandEnvironmentVariables",env,"System.String")
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
program variables tremara1 Questions (Windows Mobile) 2 10-16-2008 07:52 AM
automatic typecasting of variables? Stellaferox Questions (Windows Mobile) 4 02-04-2008 12:17 PM
Help about variables/objects skipper Questions (Windows Mobile) 6 12-19-2007 03:45 PM
Dim-ing variables colin9876 Questions (Windows Mobile) 8 11-17-2007 05:47 PM
Structure variables Erel Code Samples & Tips 0 05-19-2007 10:36 AM


All times are GMT. The time now is 07:17 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0