Re: vbscript to save file to a folder under user profile



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")



.



Relevant Pages

  • Re: 0x8004011b when trying to download the address book.
    ... OABInteg-Admin_04:43:16 PM profile was created in the Windows Messaging Subsystem on CORP-EXCH-1. ... Message Class Differential found: 8 ... Starting Test 9 - OAB System Folder Check ...
    (microsoft.public.exchange.clients)
  • Re: Automating set up?
    ... > I would like to know that their folder is automatically created, ... > up the mapping in a logon script unless there is a better way. ... My Documents will be a SUBDIRECTORY of the Profile directory here. ... Herb Martin> ...
    (microsoft.public.win2000.active_directory)
  • Re: OAB Sync issue with Exchange 2007 and Outlook 2007
    ... It sounds as if there is a reference to the old OAB in the profile. ... Checking for OAB Registry Keys ... Starting Test 9 - OAB System Folder Check ...
    (microsoft.public.exchange.admin)
  • RE: Simple Script??
    ... Well, it is not the most elegant solution I have ever written, but the script ... Since you only needed to copy a file to every profile, ... full directory recursion in the routine. ... will copy a file called File.txt to the Start folder in every profile. ...
    (microsoft.public.windowsxp.security_admin)
  • RE: Simple Script??
    ... I had a typo in the path...Your script is AWESOME THANKS AGAIN!!!! ... Since you only needed to copy a file to every profile, ... full directory recursion in the routine. ... will copy a file called File.txt to the Start folder in every profile. ...
    (microsoft.public.windowsxp.security_admin)

Loading