AutoHotkey Community

It is currently May 27th, 2012, 3:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 3rd, 2010, 8:46 am 
Offline

Joined: October 20th, 2009, 6:36 am
Posts: 10
Hi,

A_UserName contains my user name, but how can I find out all other existing accounts on my machine (Win7/Vista)? Parsing C:\Users directory? ;-)

Thx,
alpinestars


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2010, 6:22 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Try this
( tested on win7 64 and XP sp3 )
Code:
; Environment Var USERPROFILE must be installed!

loop, % subStr( uP := USERPROFILE, 1
      , inStr( uP, chr( 0x5C ), 0, 0 ) )
      . "*.*" uList := "", 2
  uList .= a_loopFileName "`n"

msgbox % "User Accounts:`n`n" uList
hth

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Last edited by TLM on August 3rd, 2010, 6:29 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2010, 6:26 pm 
Offline

Joined: October 20th, 2009, 6:36 am
Posts: 10
Perfect! Thx a lot!

alpinestars


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], bobbysoon, Google Feedfetcher and 21 guests


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

Search for:
Powered by phpBB® Forum Software © phpBB Group