470,594 Members | 1,120 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Please Help! WMI, Creating Network Shares, Setup Project, ClassLibrary

OK. I am totally frustrated here. I have a setup project within Visual
Studio. That setup project is calling a class library project by the
use of Custom Actions. Within that class library (my "helper"
project), I have an installer class. That class is called by Install,
Uninstall, Rollback, etc. I am only using Install and Uninstall.
During the installation of my application, I want to create a UNC
network share named TRM, pointed to the targetDir of the installation.
No problem, right? I thought so too. I have written all code to do so.

Originally, I was using System.Diagnostics.Process() to fire off "net
share" "sharename=TRM", etc etc... to create the shared folder. This
method works perfectly from the command line, but I couldn't get it to
work during the installation, no matter what I did. So, I abandoned
that method of creating the UNC network share and decided to go the
WMI route. No problem. I wrote the code as I thought it should be and
sure enough, it didn't work either. There isn't an error or anything
like that. So, just to see.... I took the same code, copied it all
over to a console application, and it worked perfectly! After
literally checking and testing every single line of code within the
"helper" project, I have come to the conclusion that the installer
does not have enough permissions to create the shared folder, whereas
the console application does. This is also weird because I am running
under the "Administrator" account on the local machine.

Does anyone have any ideas why I can not create a shared folder, using
"net share" or WMI, from a setup project? There are no errors. The
code executes as if it successfully creating the shared folder, only
it does not. How can I correct the issue?
Jun 27 '08 #1
1 1679
Anyone? I am stuck on this and it is holding up the release of this
product. Any suggestions would be greatly appreciated.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by duikboot | last post: by
7 posts views Thread by Alan Bashy | last post: by
7 posts views Thread by tyler_durden | last post: by
23 posts views Thread by Jason | last post: by
5 posts views Thread by tabani | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.