Results 1 to 12 of 12

Thread: Running an Executable over a network *Resolved*

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    San Antonio, TX
    Posts
    35

    Running an Executable over a network *Resolved*

    I've got an executable that runs fine if it is located on my local
    machine, but if I put it on a network drive and execute it I get
    a security exception. Is there something I can do to solve this
    problem.
    Last edited by munsworth; Sep 9th, 2003 at 09:20 AM.

  2. #2

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    San Antonio, TX
    Posts
    35
    I figured it out, thanks.

  3. #3
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    What did you do?

  4. #4
    Addicted Member
    Join Date
    Feb 2002
    Location
    closed
    Posts
    196
    What did you do?
    yes - if you have cracked it it would be nice to share your solution so others with the same problem would have a chance

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    San Antonio, TX
    Posts
    35
    In the .NET Configuration in administrative tools I added the
    executable to the list of trusted assemblies. It also lets you
    specify the permission level you want to grant it. For example,
    you don't want it to have access to your registry.

  6. #6
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You can also do it in code.

  7. #7
    Addicted Member
    Join Date
    Jul 2005
    Posts
    144

    Re: Running an Executable over a network *Resolved*

    Quote Originally Posted by DevGrp
    You can also do it in code.
    How?

  8. #8
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    Re: Running an Executable over a network *Resolved*

    you need to use CasPol.exe

    CasPol.exe -q -machine -addgroup 1.2 -url "file://Path_To_Application_on_network/*" FullTrust -name "Your_App_Name"

    This can be run from the command line, however you will probably need the full path to CasPol.exe which is located in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

  9. #9
    Addicted Member
    Join Date
    Jul 2005
    Posts
    144

    Re: Running an Executable over a network *Resolved*

    that does not good on a end user machine they do not have the rights to run this code.

    or do they?

  10. #10
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Running an Executable over a network *Resolved*

    All softeware we send out we tell the client that admin rights are required on the machine you will be installing on. Once you have that right you can do all the things we need for installation. Some places don't allow regular users to create new registry entiries we require for some software, copy files into the system32 folder or other things.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  11. #11
    Addicted Member
    Join Date
    Jul 2005
    Posts
    144

    Re: Running an Executable over a network *Resolved*

    I just created a test app and it does not work. the caspol must be run as an admin. I am really disappointed in microsoft over this. I'm looking into developing in some other language after this crap.

  12. #12
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    Re: Running an Executable over a network *Resolved*

    You definitely need to be an admin on a machine to run caspol to add a new trusted group. If you are installing a network application, I would hope that you have administrator rights and are able to do so. As GaryMazzone said, with all network applications that we deploy, we require the customer to have administrator rights to install the clients.

    Look into InnoSetup, It is what I use for an installer and it runs the CasPol Piece and I believe there is some code floating around that allows you to bypass the need for admin rights.
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width