Symbols of 'Wizard'

  • Thread starter Thread starter Michael Maes
  • Start date Start date
M

Michael Maes

Hi,

I'm not sure where to pop the question, so vb.Net, here I go:

I need the LoggedOn-UserName (as like in 'Environment.UserName') to use
in the 'default.js' for templates (like [!output PROJECT_NAME]).

Maybe someone can point me to the collection of
"wizard.FindSymbol("XXXXXX")"

Thanks for any help,

Michael
 
Hi Michael,

Try the WMI scripting:
'using the Microsoft WMI Scripting Library.
Imports WbemScripting
Dim ComputerSystemSet As SWbemObjectSet
Dim css As SWbemObject
Dim userName As String

ComputerSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_Co
mputerSystem")

For Each css In ComputerSystemSet
userName = css.UserName
Next


Wish it helps!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Hi Gary,

Thanks for your reply.
I can execute the script in vb.
But how does that translate for the 'default.js' - file in the
'Microsoft Visual Studio .NET 2003\Vb7\VBWizards - Subfolders'?

This is what I cameup with until now (but evedently does not work)


ComputerSystemSet = new ActiveXObject("WbemScripting.SWbemObjectSet");
css = new ActiveXObject("WbemScripting.SWbemObject");
var userName;
ComputerSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_ComputerSystem");
For Each css In ComputerSystemSet
userName = css.UserName;
Next

Regards,


Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top