Create Share question
Posted: Tue Mar 19, 2013 11:47 am
I'd like some help understanding the correct way to use Create Share.
If I give it a variable, such as $TARGETDIR$, it works as expected.
If I give it a string for a non-existent folder, such as "c:\xxx\xxx", it seems to run but nothing happens. No error, the folder isn't created, etc,
How is this supposed to work? How do I trap an error? I need to be able to tell the user that "a share has been created..." or "an error occurred creating a share..."
Is it better to call my own DLL that wraps NetShareAdd() and can return an error code?
If I give it a variable, such as $TARGETDIR$, it works as expected.
If I give it a string for a non-existent folder, such as "c:\xxx\xxx", it seems to run but nothing happens. No error, the folder isn't created, etc,
How is this supposed to work? How do I trap an error? I need to be able to tell the user that "a share has been created..." or "an error occurred creating a share..."
Is it better to call my own DLL that wraps NetShareAdd() and can return an error code?