473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Symbols of 'Wizard'

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
Nov 21 '05 #1
4 1723
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=impersonat e}").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.
--------------------

Nov 21 '05 #2
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=impersonat e}").InstancesOf("Win32_ComputerSystem");
For Each css In ComputerSystemSet
userName = css.UserName;
Next

Regards,
Michael

Gary Chang wrote:
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=impersona te}").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.
--------------------

Nov 21 '05 #3
Hi,

For jscript version, you may try the code below.
var ComputerSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonat e}").InstancesOf("Win32_Co
mputerSystem");
var e = new Enumerator(ComputerSystemSet);
for(;!e.atEnd();e.moveNext())
{
var ctr = e.item();
var username = ctr.UserName;
WScript.Echo(username);
}
Best regards,

Peter Huang
Microsoft Online Partner Support

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

Nov 21 '05 #4
Thanks a lot Peter, this is what I needed :-)

Best regards,

Michael
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
1
by: aerobar2 | last post by:
When I debug my application I get "no symbols loaded" ================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'MHSFire': Loaded...
1
by: asdf | last post by:
Hello, I was enjoying working in VS for half a year without any problems and now I cannot debug anymore. Without any really reason my Studio tells me that the page that I want to debug has - No...
5
by: eScrewDotCom | last post by:
www.eScrew.com eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is...
10
by: RDI | last post by:
What's it mean? My prog runs fine. Then as soon as I press ok or cancel, the following is what's in the output area of the debugger. TIA -- RDI (remove the exclamation from the email...
47
by: Pierre Barbier de Reuille | last post by:
Please, note that I am entirely open for every points on this proposal (which I do not dare yet to call PEP). Abstract ======== This proposal suggests to add symbols into Python. Symbols...
0
by: RobbRoss | last post by:
I have a c# web project from VS 2003 that went through the VS 2005 conversion wizard. The problem is that the C# code behind will not stop at the breakpoints. When the cursor is hovered above the...
3
by: JV | last post by:
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as...
0
by: shan | last post by:
*** ERROR: Module load completed but symbols could not be loaded for crystaldecisions.web.dll *** ERROR: Module load completed but symbols could not be loaded for crystalenterpriselib.dll ***...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.