Run c# .NET Program from network share

前端 未结 1 1210
半阙折子戏
半阙折子戏 2021-01-18 18:54

got a interesting problem. I placed a c# .net .exe file on a network share. If i try to

Start->Run: \\\\hostname\\test.exe

my software s

相关标签:
1条回答
  • 2021-01-18 19:56

    Caspol "tweaks" are a bit of a pain to deploy robustly. IMO, the best way to run an exe off the network is in a way that the core framework isn't going to object to in the first place.

    Since you have 3.5 SP1, one simple way is to map the share to a drive. IIRC, with this service pack, "j:\test.exe" will be trusted, even though "j:" is mapped to "\hostname", and "\hostname\test.exe" might not be trusted.

    The other approach is ClickOnce; you publish to the network share and run "test.application" instead. This also gives you options like local-copy with auto-update, file extension handling, etc.

    0 讨论(0)
提交回复
热议问题