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

T

twdo

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?
 
T

twdo

Anyone? I am stuck on this and it is holding up the release of this
product. Any suggestions would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top