You'll probably have to pass it in as a command line parameter...

However there may be APIs to return the current user's desktop
directory...  For example I think the registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders
will contain where the folder is and you can use registry
commands like RegRead exposed in Wscript's Shell object to
read it...

-Tim



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:bounce-nt2000-137542@;ls.swynk.com]On Behalf Of CHRIS H
Sent: Friday, October 25, 2002 9:33 AM
To: NT 2000 Discussions
Subject: Re: VB Scripting


Can you use the %username% variable in a vbscript? I want to save the
shortcut to the user's desktop so I pathed it like:

c:\documents and settings\%username%\desktop\shortcut.lnk

----- Original Message -----
From: "Tim George" <[EMAIL PROTECTED]>
To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 2:32 PM
Subject: RE: VB Scripting


> if launching directly doesn't work, you can always use the
> CScript executable for a console type launch where messages
> goes to the command window or WScript where messages appear
> as message boxes (GUI)...
>
> -Tim
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:bounce-nt2000-137542@;ls.swynk.com]On Behalf Of CHRIS H
> Sent: Thursday, October 24, 2002 2:29 PM
> To: NT 2000 Discussions
> Subject: VB Scripting
>
>
> This is a newbie (and probably stupid) question as I am just getting into
VB
> Scrtipting in my login scripts.
> Can I call a vbs script from a batch file? I have WSH installed. Do you
just
> c:\filename.vbs or is there a certain syntax to call it?
>
> TIA!
>
> Chris
>
>
> ------
> You are subscribed as [EMAIL PROTECTED]
> Archives: http://www.swynk.com/sitesearch/search.asp
> To unsubscribe send a blank email to %%email.unsub%%
>
>
> ------
> You are subscribed as [EMAIL PROTECTED]
> Archives: http://www.swynk.com/sitesearch/search.asp
> To unsubscribe send a blank email to %%email.unsub%%
>


------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to %%email.unsub%%


------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to