Copying a server file to a remote users PC

  • I have a DTS package that creates an output file on the server.

    However, I would like to transfer this file to the remote users PC (say the C:\). Is there anyway I can do this through the ActiveX script. I know theres a file copy function, but how about obtaining the remote users network address?

  • Hi Brendon,

    I think you should be able to do this with the filesystem object in vbscript. I have had a lot of success utilizing the filesystem object in my ActiveX scripts. The one thing that would concern me about your scenario is permissions. You may have to map two drives out from your script and then copy the file between the two mapped drives. With the right permissions and integrated security you should be able to just copy the file using the filesystem object filecopy command.

    Bruce Szabo, MCSE+I, MCDBA, MCSD


    Bruce Szabo, MCSE+I, MCDBA, MCSD

  • If IIS is available you might consider a pull rather than push solution.

    Let the user hit a web page that connects from an ASP page to the SQL Server, invokes the DTS package to produce output (say a temp table or mechanism of your choice) which you then convert into data in a web page.

    The web page doesn't really even have to be a page. For example, just put:

    Response.ContentType = "application/vnd.ms-excel"

    and then dump the data as a table, the user ends up with it in Excel (probably prompted to open or save).

    We generally do this to avoid the issue of what permissions, domains, intervening network firewalls, etc. might be between the user and the database. Of course it requires the user to invoke it, so if you wanted this to happen asynchronously, when the user was not necessarily active, it's not a good solution.

  • Brendon,

    Are you saying you don't know what the remote users' machine name? If you do, and your working with admin permissions on the remote users workstation; \\workstation\c$\ should get you to the C:\ drive.

    John

  • No, thats just it.

    The package (which is executed by the user)is creating an output file (server-wise), which I would like to transfer to the user's PC when finished (or alternatively create on the user's PC).

    The tricky part is that I'm trying to see if there is a way to include this in the DTS package. I don't know the users machine name - is there any way to identify the user calling the DTS app?

  • How is the user executing the DTS package?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply