question for any Windows gurus

23 views
Skip to first unread message

jo...@jfeldredge.com

unread,
Dec 11, 2019, 5:52:19 PM12/11/19
to nlug...@googlegroups.com

I know this isn’t a Linux question, but I am hoping someone in the group may know the answer. On a client’s system, I need to be able to retrieve files from a hidden network share. This share has a name ending in a dollar sign, which keeps it from showing up in Windows Explorer. I can browse to this share in Windows Explorer by typing in the UNC path, including the dollar sign. However, trying to connect to this share via code fails, with an error message indicating that the share isn’t available. How do I connect to it via code?

Dave Tomlin

unread,
Dec 11, 2019, 6:08:25 PM12/11/19
to nlug...@googlegroups.com
I’d suggest creating a new share with restricted access. Shares with a $ on the end are administrative shares and can typically only be accessed by administrative users. You’d have to authenticate with administrative login via your code to access them which is never a good idea.

On Wed, Dec 11, 2019 at 4:52 PM <jo...@jfeldredge.com> wrote:

I know this isn’t a Linux question, but I am hoping someone in the group may know the answer. On a client’s system, I need to be able to retrieve files from a hidden network share. This share has a name ending in a dollar sign, which keeps it from showing up in Windows Explorer. I can browse to this share in Windows Explorer by typing in the UNC path, including the dollar sign. However, trying to connect to this share via code fails, with an error message indicating that the share isn’t available. How do I connect to it via code?

--
--
You received this message because you are subscribed to the Google Groups "NLUG" group.
To post to this group, send email to nlug...@googlegroups.com
To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en

---
You received this message because you are subscribed to the Google Groups "NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nlug-talk/234301d5b075%24a09291c0%24e1b7b540%24%40jfeldredge.com.

John F. Eldredge

unread,
Dec 11, 2019, 6:30:12 PM12/11/19
to nlug...@googlegroups.com
The problem is that I am creating a utility program, intended to be run by ordinary users, which will check whether there is a new version of certain proprietary software on the server, and download and install it if it finds an update. On a Unix or Linux machine, I would set this app to run under a privileged user ID. Is there a Windows version of this capability?

Adam Hudson

unread,
Dec 12, 2019, 8:32:10 AM12/12/19
to nlug...@googlegroups.com
If I'm understanding your needs, there is an option within Windows to run a specific executable as an administrator or as another user with administrator privileges, though I'm only familiar with how to execute it within the GUI.  If you right-click the file, you can select Properties>Compatibility>(check box) Run as Administrator.  You can also hold shift to right click and access the option to run as a different user, though this would force you to submit that user's credentials.  Given that there's a way to do this within the GUI, there has to be a way to script that for your users via Powershell.  But seeing those options in the gui may at least give you the Windows verbage you're looking for.

Does that address your question effectively?  Or is the issue more complex than that?

Thanks,
Adam H



--
Thank you,
Adam Hudson

Tilghman Lesher

unread,
Dec 12, 2019, 2:31:09 PM12/12/19
to NLUG
Maybe this?

https://stackoverflow.com/questions/28989750/running-powershell-as-another-user-and-launching-a-script

On Wed, Dec 11, 2019 at 4:52 PM <jo...@jfeldredge.com> wrote:
>
> I know this isn’t a Linux question, but I am hoping someone in the group may know the answer. On a client’s system, I need to be able to retrieve files from a hidden network share. This share has a name ending in a dollar sign, which keeps it from showing up in Windows Explorer. I can browse to this share in Windows Explorer by typing in the UNC path, including the dollar sign. However, trying to connect to this share via code fails, with an error message indicating that the share isn’t available. How do I connect to it via code?
>
> --
> --
> You received this message because you are subscribed to the Google Groups "NLUG" group.
> To post to this group, send email to nlug...@googlegroups.com
> To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "NLUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nlug-talk/234301d5b075%24a09291c0%24e1b7b540%24%40jfeldredge.com.



--
Tilghman
Reply all
Reply to author
Forward
0 new messages