Curious problem with 'kill', 'dir', and 'shell'. Thanks for help.

  • Thread starter Thread starter philip
  • Start date Start date
P

philip

It is the third time that I have this problem since two years :
The function 'kill', 'dir' and 'shell' doesn't function anymore.
More, the function 'kill' causes the exit of the current procedure.
I replaced these functions usinf object FileScripting.

But also, the function 'shell' doesn't function anymore.

So I have two questions :
1. Someone does he know the origin of this problem ?
2. How can I replace the 'shell' function ?

One solution only, if someone doesn't help me : reinstall Windows. I did
that twice in two years for this reason.
Burk !

Thanks for your help, sincerely.

Philip
 
philip said:
It is the third time that I have this problem since two years :
The function 'kill', 'dir' and 'shell' doesn't function anymore.
More, the function 'kill' causes the exit of the current procedure.
I replaced these functions usinf object FileScripting.

But also, the function 'shell' doesn't function anymore.

So I have two questions :
1. Someone does he know the origin of this problem ?
2. How can I replace the 'shell' function ?

One solution only, if someone doesn't help me : reinstall Windows. I did
that twice in two years for this reason.


That sounds like a security setting. Try checking Help for
Sandbox for details.
 
In
philip said:
It is the third time that I have this problem since two years :
The function 'kill', 'dir' and 'shell' doesn't function anymore.
More, the function 'kill' causes the exit of the current procedure.
I replaced these functions usinf object FileScripting.

But also, the function 'shell' doesn't function anymore.

So I have two questions :
1. Someone does he know the origin of this problem ?
2. How can I replace the 'shell' function ?

One solution only, if someone doesn't help me : reinstall Windows. I
did that twice in two years for this reason.
Burk !

Hi Philip,

I'm not that much of an Access guru, but might it be that Kill etc. raises
an error? In that case: what's the error code? You can test it by
temporarily inserting two lines in your code;
On error resume next
above the Kill, and
Call Msgbox(Err.Number & ": " & Err.Description)
below the Kill.

I can see Kill throwing an error when the file you want to kill is locked,
or when you operate from within the wrong folder and do not specify a path
for the file to kill. The last cause will also probably cause Dir and Shell
to misfunction.

Kind regards,
Carl Colijn
 
I tried what you tell, but on line "kill", the program exits from procedure
immediately, without detecting an error...

Thanks for your help
 
Yes, you were right.
That was the result of 'macro security' of kaspersky.
Ouf.
It is a great help for me.
Thanks sincerely.
Philip
 
It was a Kasperky protection on macros...
Thanks

Carl Colijn said:
In

Hi Philip,

I'm not that much of an Access guru, but might it be that Kill etc. raises
an error? In that case: what's the error code? You can test it by
temporarily inserting two lines in your code;
On error resume next
above the Kill, and
Call Msgbox(Err.Number & ": " & Err.Description)
below the Kill.

I can see Kill throwing an error when the file you want to kill is locked,
or when you operate from within the wrong folder and do not specify a path
for the file to kill. The last cause will also probably cause Dir and
Shell to misfunction.

Kind regards,
Carl Colijn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top