I keep getting a 'Code 0; Permission Denied' error, while trying to run some .hta embedded vbs over my LAN Network, but when I run it locally (on my desktop) its just fine.

My guess is this has something to do with writing to and / creating files in the .hta's local directory...

How do I rectify this?
Do I need to declare a Network variable or something???

Sorry... double post!

. Create the logic for a program that calculates and displays the amount of money you would have if you invested $1,000 at 5 percent interest for one year. Create a separate method to do the calculation and return the result to be displayed.

The "Code 0; Permission Denied" error typically occurs when your script is trying to access resources, such as files or directories, for which it does not have the necessary permissions. In your case, the error might be related to accessing files over your LAN network.

To rectify this issue, you can try the following steps:

1. Check file and folder permissions: Ensure that the user account running the script has the necessary permissions to read, write, and execute files and folders on both your local machine and the LAN network. Make sure that all folders and files involved have appropriate read/write access permissions.

2. Run the script with elevated privileges: Try running your script with administrator or elevated privileges. Right-click on the script file or the program you are using to run the script and select "Run as administrator." This will give the script additional permissions to access resources.

3. Map network drives: If your script requires accessing files on a shared network drive, consider mapping the network drive on your local machine. By mapping the network drive, you can assign a drive letter to the network location, making it easier for your script to access the files on the network.

To map a network drive, you can follow these steps:

- Open "File Explorer" on your local machine.
- Click on "This PC" or "My Computer" in the sidebar.
- In the "Computer" tab, click on "Map network drive."
- Select a drive letter for the network drive and enter the path to the shared folder on your LAN network.
- Check the "Reconnect at sign-in" option if you want the drive to be automatically mapped every time you start your computer.
- Click "Finish" to map the network drive.

4. Use UNC paths: Instead of using drive letters, you can use UNC (Universal Naming Convention) paths in your script. UNC paths use the network path directly instead of relying on mapped drive letters. For example, instead of using "Z:\folder\file.txt," you can use "\\servername\share\folder\file.txt." UNC paths are less reliant on local configurations and can be more consistent across different systems.

By following these steps, you should be able to rectify the "Code 0; Permission Denied" error and successfully run your .hta embedded VBS script over your LAN network.