Groups | Blog | Home
all groups > dotnet faqs > november 2006 >

dotnet faqs : File Creation in DotNet Installer


apondu
11/6/2006 3:05:28 AM
Hi,

I needed some help in the installer. I have a project and nw i decided
to create a Installer for this project. I wanted to create a file in
this Installer. I have a override function for the installer. Nw i
have written a code to create a file in this override function for
install. But this code doesn't work and i am not able to create any
file. But i don't get any exceptions whn i execute the the code and run
the installer. I needed to know whether i am misssing somethig.. and is
it the right process..

Thanks for the help...

Regards,
Govardhana
Phil Wilson
11/6/2006 12:19:58 PM
If you've done this in an Installer class, you're called on top of the
Windows Installer process (it's not a DotNet Installer, it's the more
general Windows Installer service). Your code may have worked (how do you
know it doesn't?) and created the file in the System folder because that's
the context you're running in, not your application folder.
--
Phil Wilson
[Microsoft MVP Windows Installer]
[quoted text, click to view]

apondu
11/6/2006 9:02:03 PM
Hi Phil,

Thanks for the response.

I am sure about the file not being created because

1. I have give the path where the file to be created in the code.

2. I made a search for the file (File Name i used ) in the system to
check if it was created, but i couldn't find any file by the given
name.

Phil, i have written this file creation code in the overrided Install
function. I don't know wht's the problem. I want to know whether i need
some permission, where am i missing...

It would be helpful if u let me know the procedure for the file
creation. I don't want to use the App.Config file. I want to create a
text file.

Waiting for ur response.

Regards,
Govardhan.





[quoted text, click to view]
Phil Wilson
11/7/2006 12:34:36 PM
If you want your installer class methods called you must add the assembly as
a custom action in your setup project - I'm just covering all the
possibilities here.

--
Phil Wilson
[Microsoft MVP Windows Installer]
[quoted text, click to view]

AddThis Social Bookmark Button