Re: vbscript to save file to a folder under user profile
"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: 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: 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) - Re: XPsp2 and WMP10 and default profiles - a solution
... This script needs to be referenced in the SysPrep.inf file, ... >> default user profile. ... >> and Windows Media Player 10 installed, XP always creates a Windows Media ... >> it ignores the default user profile folder and uses the Administrator ... (microsoft.public.windowsxp.setup_deployment) - Re: Set profile and homefolder path at logon?
... The profile folders are stored on server1. ... In each user's profile we have the profile path set to that server and their ... The same with the home folder - set to server1\username. ... What I was planning on doing was to set up a script which would copy those ... (microsoft.public.windows.server.scripting) |
|