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?
Create Share question
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Create Share question
Dear User,
Unfortunately, the "Create Share" command doesn't return a result value.
As possible alternative, you can try to verify if that particular folder exist using "Does File/Folder Exist" and then if TRUE, you could use "Create Share" command.
Regards
Unfortunately, the "Create Share" command doesn't return a result value.
As possible alternative, you can try to verify if that particular folder exist using "Does File/Folder Exist" and then if TRUE, you could use "Create Share" command.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Create Share question
FrancescoT wrote:Unfortunately...
Thanks Francesco. I'll make a workaround now that I know how IA handles this.
On one side, I think "IA should be smart enough to return a value from this type of call." But on the other side, I like the way IA works. It requires some extra effort but I prefer software that doesn't try to do everything for everyone.
Who is online
Users browsing this forum: No registered users and 103 guests