Question

Locked

VB6 vs File permissions

By JTD ·
I have a small VB6 program built in an Excel environment running on XP Pro trying to write files into subfolder on a drive defined on a Windows Server 2003 server. I use a ScriptingFileSystem object.

When i write to the root of the drive it works fine. When I try to write to a subfolder I get "Runtime Error 70 - Access Denied." I've researched file permissions, user groups, inheritance, DOS ATTRIB command, ad nauseum but still haven't found a solution.

It would help if I knew how the programs appears to the security system - under my login ID, or what?

Thanks in advance for any information you can provide.

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

VB6 File permissions

by Xwindowsjunkie In reply to VB6 vs File permissions

The biggest issues here are that the VBA6 or VB6 permissions are set by the user running the application UNLESS the the VB6 application uses a security object to set the permissions higher. The problem is that VB6 cannot directly assert a permission level higher than the user by default in Server 2003. The security object model has been changed to avoid the exact same thing you're trying to do. On the Server 2003 you need to elevate the user's permissions to allow the user group to have the permission to run the application on the Server. You didn't indicate whether the Server was a domain or stand-alone server. That's where you need to make it work. The easiest way to do it is to make a group who's permission on the domain or server is set to allow it to run that application. Then add users to that group so that then they can run the application. BTW in a workgroup situation the permissions on each of the XP boxes the application must likewise be set to allow the application to run. With SP2 the security model was also changed to fix the same thing happening on XP Pro boxes.

Back to Networks Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums