Access denied error ! - Forum

Forum Navigation
You need to log in to create posts and topics.

Access denied error !

Page 1 of 2Next

I want to create a folder at the windows temp folder by the following code:

CreateFolder "[TempDir]\Test_folder"

But when I run this code in my publication, the access denied error is appeared.

What's the solution?

@saeid

You don't need a slush

CreateFolder "[TempDir]Test_folder"

@vadim

I also tested it without backslash. The same error was appeared. "Access is denied"

 

@saeid

The slash sign is not needed at all after the special variable.

@vadim

I tested my publication with following code (without slash):

CreateFolder "[TempDir]Test_folder"

But still the "Access is denied" error is appeared!

 

@saeid

Try:
1) Run VisualNEO Win in administrator mode.
2) If the first one does not help, then disable antivirus for a while.

@vadim

I tried both of your suggested solutions, but non of them could solve my problem, unfortunately.

@saeid

Is the folder created in other folders? For example, in the "My Documents" directory?

In any case, I recommend that you always run VisualNEO Win with administrator privileges.

 

@vadim

I can't create the folder in any directory even if I run it as administrator. The same error is appeared.

@saeid

I suppose you need to put VisualNEO Win.
to antivirus exceptions and mark the application as safe.

Try putting the attached project on your desktop and running it. Clicking will create a folder on your C drive. If the folder will not be created, the problem is most likely with Windows security (user rights, antivirus or other restrictions set in Windows settings).

Try the compiled application as well. Maybe the compiled version will work. Check the problem on another computer to see what is affecting the performance of your project.

 

Uploaded files:
  • You need to login to have access to uploads.

Perhaps the issue isn't with VisualNeo. Do you have restrictions of some sort as a user on that computer?
Or perhaps you could try using a plugin such as rtFileManager or NeoFM\FTP. Some plugins will use a different process than the native VisualNeo actions.

@vadim

@pauljonestindall

I found out that the error was related to "ExtractFile" action. I write the following code in startup action:

CreateFolder "[TempDir]Test_folder"
ExtractFile "[Embedded]Pic1.jpg" "[TempDir]Test_folder"
ExtractFile "[Embedded]Pic2.jpg" "[TempDir]Test_folder"

During running the publication, when it reaches to the above "ExtractFile" actions, the "Access is denied" error is appeared.

Do you know what the problem is ?????!!!!??!?!?!?!?!

Well, for one thing you need the name of the destination folder and file.

ExtractFile "[Embedded]Pic1.jpg" "[TempDir]Test_folder\Pic1.jpg"
ExtractFile "[Embedded]Pic2.jpg" "[TempDir]Test_folder\Pic2.jpg"

See if this works.

Hello,

Did you check if the folder is created? Open it with explorer to check.

Did you check if your pic1 + pic2 are really in the embedded list?

And there correctly with their real path?

Regards

 

 

 

@hpw

Hi,

The answer of all of your questions is "Yes".

@pauljonestindall

It works. Thanks a lot for you help.

How can I remove the created folder after shutting down the publication?

I wrote the following code in Shutdown action:

RemoveFolder "[TempDir]Test_folder"

But the following error was appeared after shutting down the publication:

"Unable to remove this folder"

This can be caused by this folder is in use by application when running.

Try delete this folder after your application closed. (E.g. run a dos command when app is shutting down

for example: Run -> rmdir YourTempDir\Test_folder or similar)

@jncon

I want that the created folder to be removed automatically after shutting down the publication. How can I do that?

You may can delay the command line while application is closing.

Try that at shudown event:

waitfor /T 2 pause  -> waiting 2 secs before command runs

rmdir YourTempDir\Test_folder -> remove folder

 

Sorry, I don't have NeoBook on my current machine, I will try how to solve your problem later at home.

Or that seems better:

Make a text file with the following content:

 

waitfor /T 2 pause

rmdir YourTempDir\Test_folder

 

Save it as "rmdir.cmd" or similar name to the pulication directory

With shutdown event use this cmd file with Run command (Run -> [PubDir]rmdir.cmd)

 

Page 1 of 2Next