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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • twdo

    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.Diagnost ics.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 "Administra tor" 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?
  • twdo

    #2
    Re: Please Help! WMI, Creating Network Shares, Setup Project, ClassLibrary

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

    Comment

    Working...