PDA

View Full Version : copy the source files


kala
05-01-2008, 12:07 AM
hi to all,
i want to copy the source file of my project to current windows directory and make it run it windows.
i.e, like a startup program but invisible to the user using the computer. is it possible with media studio.


also how to get the souce file path of the file (autoplay.exe) irrespective of where it has been copied in the system

ShadowUK
05-01-2008, 12:09 AM
File.Copy(_SourceFolder.."//"..SourceFilename, _WindowsFolder);

longedge
05-01-2008, 01:57 AM
Easiest way to get an app to run at startup is to put it in the " C:\Documents and Settings\All Users\Start Menu\Startup " folder although I don't have Vista and it might be a problem copying stuff into there on machines that are running it - don't know.

You can do it via registry as well but same problem will exist.

It would be good practice to tell/ask users when you do it and offer an opt out.

RizlaUK
05-01-2008, 08:10 AM
if vista blocks access to the startup folder then you can bet the registry is also blocked

why copy the app ??, create a shortcut to your app in the startup folder then test if the file exists to make sure it was created