Re: vbscript to save file to a folder under user profile
- From: Chris <Chris@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 Feb 2008 15:32:03 -0800
sorry for my poor scripting knowledge. how does that help me to define the
folder path since it varies based on logon ID? I saw some profile folders
are names under userid and others are in the format as userid.domainname. If
I can get the proper folder name of the profile as the user logs on then I
can specify the path with that folder variable. Is it the right way to do?
how to get there?
Thanks.
"Pegasus (MVP)" wrote:
.
"Chris" <Chris@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D589FDD7-68BA-4302-8899-9EB4A56CE877@xxxxxxxxxxxxxxxx
I'm working on a vbscript, which will be added to our logon script. The
script will query our SQL server and generate a signature file and save it
to
a folder under user's profile. For example, the file is called
company.htm
and will be saved at c:\documents and settings\<userid>\application
data\microsoft\signatures. How can I define the path in the script so the
file will be saved properly under each profile. Some computers are shared
by
roaming users. I'm sure it's very easy but I'm not good at vbscript so
please help.
thanks.
You can extract an environmental variable like so:
Set objWshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo "UserProfile=" &
objWshShell.Environment("PROCESS")("UserProfile")
- Follow-Ups:
- Re: vbscript to save file to a folder under user profile
- From: Franz aRTiglio
- Re: vbscript to save file to a folder under user profile
- References:
- Re: vbscript to save file to a folder under user profile
- From: Pegasus \(MVP\)
- Re: vbscript to save file to a folder under user profile
- Prev by Date: Re: HTA_HelpOMatic
- Next by Date: Re: Need help with Window's Zipping facility.
- Previous by thread: Re: vbscript to save file to a folder under user profile
- Next by thread: Re: vbscript to save file to a folder under user profile
- Index(es):
Relevant Pages
|
Loading