Jump to content
JCH

Adding share on Windows 10

Recommended Posts

JCH

Has anyone tried to run _Net_Share_ShareEnum on Windows 10?

It says it adds the share but doesn't give any info on the share.

I'm trying to add a share with _Net_Share_ShareAdd but don't have any success.

Any help would be appreciated.

Share this post


Link to post
Share on other sites
AutoBert

The linked example works perfect. What are your issues?

Share this post


Link to post
Share on other sites
JCH

Thanks JohnOne, that worked! :)

I thought it was enough to be logged in as admin, but apparently not!

 

Share this post


Link to post
Share on other sites
spudw2k
On 7/30/2016 at 3:41 PM, JCH said:

I thought it was enough to be logged in as admin, but apparently not!

The account you are logged in with might be an admin, but you still need to elevate privileges to create the share.  It's a security mechanism.  Depending on how UAC is confgured--typically--if the user account launching a script (after #RequireAdmin has been added to it) is simply prompted with a Yes/No acknowledgment window, that indicates the account is an admin; if instead you get prompted for a username and password than likely the launching user account is not an admin.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.