During setup want to copy files and do registry settings on client machine

irfi

Member
Joined
Sep 24, 2009
Messages
16
Programming Experience
1-3
Hi everyone,
I want to create setup for my windows application in VS(2005) and would very much appreciate if someone could guide me on how to include external files and do registry settings during setup.

During Setup on client machine how can i automatically do the following:

1- I want to copy a dll and an OCX file to System32 folder
2- I want to do some registry settings.
3- copy a folder into "C:\Program Files\"
4- Want to run external .exe program

Is it possible.....
Thanx and cheers
IrFi
 
1. Create a setup project, go to File > Add > New Project...
2. Under 'Other Project Type', select 'Setup and Deployment'.
3. Click on 'Setup Project', name the setup, then click OK.
4. It will take you to the File System view, this is where you would put the files you want to copy.
5. Add you project to the setup output: Right-click on the setup project in the Solution Explorer, then under 'Add', click 'Project Output...'.
6. Click 'OK'. Now right-click the setup project again and under 'View', select 'Registry'. That is where you will put you keys.

To add the system folder, go to the File System view, right-click on the 'File System on Target Machine' item and under 'Add Special Folder', click on 'System Folder'. Simply drag-and-drop any files you would like.

To add the program files folder, follow the steps above, except instead of clicking 'System Folder', select 'Program Files Folder'.

For the registry, add the keys you would like into it.

To run an EXE at the end of the setup, you will need to create either a JS file, a VB Script file, or an EXE file that runs the file, then add the file you created to the 'Application Folder' directory in the setup. Then you will need to right click on the setup in Solution Explorer, go to 'View' then click on 'Custom Actions'. In Custom Actions, right click on 'Install' and select 'Add Custom Action...'. Find your script/file that you just created and select it, click OK and you are set.

To build the setup, right click on it in Solution Explorer and click on 'Build', when it has finished building find the setup in you Visual Studio projects folder. Then find the 'Debug' folder, there should be two files in there, setup.exe and another MSI. The MSI is the actual installation.

Hope this helps!
-Josh
 
Hey Josh,
Thanx for a detailed response. I will check and let you know. I am sure gonna rate your post!
IrFi
 
Sure thing! Let us know if you have any more questions.
 
Back
Top