How i can 
Author Message
 How i can

Use this comands in VBS
%USERNAME%
NET USE D: \\SERVERNAME\SHERNAME$


Sun, 10 Oct 2004 01:40:27 GMT  
 How i can

WshNetwork.UserName

This is the WSH equivalent


Quote:
> Use this comands in VBS
> %USERNAME%
> NET USE D: \\SERVERNAME\SHERNAME$



Sun, 10 Oct 2004 01:52:19 GMT  
 How i can
I'm not sure what you want to *do* with the %USERNAME% value - blaxshep told you
what the equivalent was assuming you use:

set WshNetwork = CreateObject("WScript.Network")

Below is a snippet of a script that demonstrates this stuff.  I assume you
*meant* to use
Net Use D: \\servername\USERNAME$

Set oNet = CreateObject("WScript.Network")
' next line just gives us a "short" variable name
User = oNet.UserName
oNet.MapNetworkDrive "D:", \\servername\ & User & "$"


Quote:
> Use this comands in VBS
> %USERNAME%
> NET USE D: \\SERVERNAME\SHERNAME$



Sun, 10 Oct 2004 07:33:23 GMT  
 How i can
Thank you this is what i want!

U?ytkownik "Alex K. Angelopoulos"


Quote:
> I'm not sure what you want to *do* with the %USERNAME% value - blaxshep
told you
> what the equivalent was assuming you use:

> set WshNetwork = CreateObject("WScript.Network")

> Below is a snippet of a script that demonstrates this stuff.  I assume you
> *meant* to use
> Net Use D: \\servername\USERNAME$

> Set oNet = CreateObject("WScript.Network")
> ' next line just gives us a "short" variable name
> User = oNet.UserName
> oNet.MapNetworkDrive "D:", \\servername\ & User & "$"



> > Use this comands in VBS
> > %USERNAME%
> > NET USE D: \\SERVERNAME\SHERNAME$



Sun, 10 Oct 2004 20:00:08 GMT  
 
 [ 4 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software