WNetCancelConnection2 was "running external Dos commands"

WNetCancelConnection2 was "running external Dos commands"

Post by RHVia » Thu, 28 Jul 2005 02:25:06


After working with the WNetAddConnection2 for some time I've noticed a
problem. I want to be able to map to another share with a user who has
different access. However I can't do this. I even set up a new aspx page but
still it uses the previous user. If I restart the server which seems to be
the only way to remove the remembered connection then the new aspx page user
cannot access the share until I run the precious aspx page first. I think my
problem is that I haven't deleted the previously made connection. I tried to
use the WNetCancelConnection2 but I can't get this to work. Is there any
other way to do this.

Brian

BTW. If I don't enter any username or password the share can still be
accessed once it has been used by the original user. I'm having a major
security crisis with this.
 
 
 

1. Command that runs at DOS prompt does not run when using X command

2. Check for Errors in a DTS package using a DOS Command or any external Command.

I am running my DTS in a batch file using the DTSRUN utility.

This DTS will be run by users so I need to make sure that if the DTS
does not runs properly
it should prompt the user with an error.

Is there any way to do this within batch file using any command. Right
now I am printing on the
screen for users to check for error messages, but if there is error
will there be a way to print those errors. The user will press any key
to exit.

The package can only be run once in a day successfully as it copies
data from one table to another and there are primary key constraints.
So the package will not run if trying to insert duplicate data which
already exists in the table.

This is my batch file.

@ECHO OFF
ECHO.
dtsrun /Smyservername /Umyusername /Pmypassword /Nmypackagename
ECHO CHECK FOR ERRORS. Notify Database Team in case of Errors.
PAUSE
CLS
EXIT

Is there way to warn users if the DTS did not succeed or generate
atleast one error.

3. Run DOS Commands in Pdox 4.5 DOS

4. run 2 dos commands using vbScript as a single command

5. Running command line command without the DOS window

6. Question on running a file from the DOS run command window

7. Command that runs at DOS prompt does not run when using X

8. Short cut dos command to open wordpad and other dos commands?.

9. Using AS2 to Call JavaScript w/ External Interface: What Am I Doing Wrong?

10. shell-command in external w32-dos-box

11. How to call an external program or DOS-command

12. Adding DOS external commands?

13. DOS external commands like xcopy not working in a batch file started from CreateProcess API

14. Trying to get an ARMV Emulator SDK to run - What am I doing wrong?

15. IMac Running Ubuntu (Originally was: What am I doing wrong?)