So I have a script the calls ImpersonateLoggedOnUser to do some stuff in a specific account. This part is working fine. The problem is that when the exe starts up (before any of the script is run) it extracts some temporary files to the docs & settings\user name\local settings\temp directory, or something like that. When the script has changed users, that temp file is no longer accessible by the script because its now running with credentials different from when the temp file was created. So I need to be able to change users and still access those temp files. To do this I can think of these options:

1) Change the location the the temp files are created, but I don't see anyway to do that.

2) Change the permissions on the temp files, but I don't know the file names(They are all like SB123A.tmp). Also, I don't know if the permissions are changed immediately or later (I seem to recall doing that before and they were set after everything else was done).

3) Change the EXE stub to a custom one. I don't think SB supports this (I had some installer years ago that did).

4) Something I didn't think of.

I'm using SB Developer 6.9 on a Windows XP box.

Thanks,