dbTalk Databases Forums  

Using environment variables in DTS package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Using environment variables in DTS package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default Using environment variables in DTS package - 01-19-2005 , 10:09 AM






I have a package that I am using to take data from a table in SQL out to an
Excel spreadsheet. However, what I'd like to do is have the package put the
Excel workbook on an individual's desktop. I tried using the %userprofile%
variable but the system is not accepting that. Is there a way to do this, or
would I need to put the spreadsheet on a network share and then launch a BAT
file to move it to the user's desktop?

Thanks in adavance,
Chris

Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: Using environment variables in DTS package - 01-20-2005 , 07:26 AM






Chris,

Is this the same PC on which the package runs? If that is the case then use
dynamic properties task to read USERPROFILE environmental variable into the
your variable and use ActiveX script task to concatenate '\Desktop' to it .
Otherwise put the file on a share and make a shortcut to it from a user's
desktop. There is not point in propagating a file into a user's desktop
because different users would have different paths in the same PC.

Ilya

"Chris" <Chris (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a package that I am using to take data from a table in SQL out to
an
Excel spreadsheet. However, what I'd like to do is have the package put
the
Excel workbook on an individual's desktop. I tried using the %userprofile%
variable but the system is not accepting that. Is there a way to do this,
or
would I need to put the spreadsheet on a network share and then launch a
BAT
file to move it to the user's desktop?

Thanks in adavance,
Chris



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.