![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Get username in vbscript I have been trying to get the username into a textbox because of my vba background I have been trying to use environ("Username") is there another way of doing this or am I barking up the wrong tree? any help will much appreciated Regards |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Get username in vbscript It's available from the WshNetwork object. You have downloaded the VBScript documentation files from Microsoft, right? If not, do so, quickly! ![]() arno On Thu, 20 Aug 2009 03:36:53 -0700, vqthomf <vqthomf@xxxxxx> wrote: Quote: >I have been trying to get the username into a textbox because of my vba >background I have been trying to use environ("Username") is there another way >of doing this or am I barking up the wrong tree? >any help will much appreciated >Regards |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Get username in vbscript "vqthomf" <vqthomf@xxxxxx> wrote in message news:3BB1A152-2016-448B-B915-1A86BA3F1EE1@xxxxxx Quote: >I have been trying to get the username into a textbox because of my vba > background I have been trying to use environ("Username") is there another > way > of doing this or am I barking up the wrong tree? > any help will much appreciated > Regards Set oWshShell = CreateObject("WScript.Shell") MsgBox oWshShell.ExpandEnvironmentStrings("User name=%UserName%") |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Get username in vbscript Thanks for the help it works on my compter but it wont work on my boss computer the error asked for wscript?? Regards "Pegasus [MVP]" wrote: Quote: > > "vqthomf" <vqthomf@xxxxxx> wrote in message > news:3BB1A152-2016-448B-B915-1A86BA3F1EE1@xxxxxx Quote: > >I have been trying to get the username into a textbox because of my vba > > background I have been trying to use environ("Username") is there another > > way > > of doing this or am I barking up the wrong tree? > > any help will much appreciated > > Regards > Here you go: > Set oWshShell = CreateObject("WScript.Shell") > MsgBox oWshShell.ExpandEnvironmentStrings("User name=%UserName%") > > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Get username in vbscript It's ok now we got it work on both he had wscript.network and not .sheel thanks to you all I have a load of books and help files and I still find it hard, I think because my boss want to jump before we can walk but then he is the boss. Regards "Pegasus [MVP]" wrote: Quote: > > "vqthomf" <vqthomf@xxxxxx> wrote in message > news:3BB1A152-2016-448B-B915-1A86BA3F1EE1@xxxxxx Quote: > >I have been trying to get the username into a textbox because of my vba > > background I have been trying to use environ("Username") is there another > > way > > of doing this or am I barking up the wrong tree? > > any help will much appreciated > > Regards > Here you go: > Set oWshShell = CreateObject("WScript.Shell") > MsgBox oWshShell.ExpandEnvironmentStrings("User name=%UserName%") > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Vista login "incorrect username or password" with correct username and password entry | Vista General | |||
| Username and password | Vista mail | |||
| Username Change | Vista General | |||
| How to get first, last and username from AD | PowerShell | |||
| How to do No hang up VBScript (nohup for VBScript) | VB Script | |||