get full path name...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
11:20 AM
03-16-2010
11:20 AM
get full path name...
Hi,
I have a Windows application that is tested on XP, Vista, and W7 (all in 6 different languages). In the application I have to enter a path name to a "Bluetooth Exchange Folder" into a field. In XP it's called "C:\Documents and Settings\<user name>\My Documents\Bluetooth Exchange Folder", and in Vista (I assume W7 also) it's called "C:\Users\<user name>\Documents\Bluetooth Exchange Folder". I'm looking for a way to get this full path name (assuming that the folder name is the same for each). I'm writing my scripts in jscript. Is there an easy way to do this, so that I can plug the full path name into a variable?
Thanks!
Jeff
I have a Windows application that is tested on XP, Vista, and W7 (all in 6 different languages). In the application I have to enter a path name to a "Bluetooth Exchange Folder" into a field. In XP it's called "C:\Documents and Settings\<user name>\My Documents\Bluetooth Exchange Folder", and in Vista (I assume W7 also) it's called "C:\Users\<user name>\Documents\Bluetooth Exchange Folder". I'm looking for a way to get this full path name (assuming that the folder name is the same for each). I'm writing my scripts in jscript. Is there an easy way to do this, so that I can plug the full path name into a variable?
Thanks!
Jeff
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
02:10 PM
03-16-2010
02:10 PM
Sys.Username will get you the username.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010
12:00 AM
03-17-2010
12:00 AM
Hello Jeff,
You can use the script below to get the full path to the 'Bluetooth Exchange Folder' directory:
var wshShell = Sys.OleObject("WScript.Shell");
var path = wshShell.RegRead("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Personal");
Log.Message(path + "\\Bluetooth Exchange Folder");
-----
Alexander
Customer Care Manager
Alexander
Customer Care Manager
