Click here to Skip to main content
15,886,724 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWhat does "GetFiles" do in system directories? Pin
Sonhospa25-Apr-16 1:14
Sonhospa25-Apr-16 1:14 
AnswerRe: What does "GetFiles" do in system directories? Pin
Richard Deeming25-Apr-16 2:01
mveRichard Deeming25-Apr-16 2:01 
GeneralRe: What does "GetFiles" do in system directories? Pin
Sonhospa25-Apr-16 2:46
Sonhospa25-Apr-16 2:46 
AnswerRe: What does "GetFiles" do in system directories? Pin
Bernhard Hiller25-Apr-16 22:12
Bernhard Hiller25-Apr-16 22:12 
GeneralRe: What does "GetFiles" do in system directories? Pin
Sonhospa26-Apr-16 3:23
Sonhospa26-Apr-16 3:23 
AnswerRe: What does "GetFiles" do in system directories? Pin
Sonhospa26-Apr-16 4:16
Sonhospa26-Apr-16 4:16 
QuestionUpdate UI of MDI Parent Pin
Sonhospa25-Apr-16 0:49
Sonhospa25-Apr-16 0:49 
QuestionVBScript DeleteFolder method cannot delete folders under System32 on Win 8.1 Pin
robwm121-Apr-16 10:36
robwm121-Apr-16 10:36 
Hi,

I need to delete the folder C:\Windows\System32\Macromed using vbscript but I consistently get access denied no matter how my code is written. I have used an admin prompt to run the script and used psexec to get System rights but get the same access denied result.

•File Explorer - Can't delete manually without responding to request for elevated privileges. I don't want to click the Continue button because that is likely not the configuration for 99.9% of the clients that I will deploy against.
•User CMD - cannot delete folder with RD using command window
•Admin CMD - script cannot delete the folder
•System CMD (psexec) - script cannot delete the folder.
•Trying to shell out to run RD won't work either.


I thought that this could be due to files existing in subfolders but I get access denied when trying to delete just the files to empty the folder. This folder is created when Flash Player is installed but in this case, Flash Player is removed but the folder is left behind. I think it's unlikely that any of the files (4) involved are in use.

Inspecting the security settings shows me that the folder owner is System with full control and Trusted Installer also has full control. System gets an access denied message when it tries to delete the folder even though System is the owner.

How can I change the folder security so it will allow the script to delete the folder? I am using basic code seen in just about any example given for fso.DeleteFolder. I have seen a few forums that recommend using icacls.exe. I haven't tried that one yet but intend to.

Thanks,
Rob

modified 21-Apr-16 16:45pm.

AnswerRe: VBScript DeleteFolder method cannot delete folders under System32 on Win 8.1 Pin
Dave Kreskowiak21-Apr-16 14:31
mveDave Kreskowiak21-Apr-16 14:31 
AnswerRe: VBScript DeleteFolder method cannot delete folders under System32 on Win 8.1 Pin
Sonhospa25-Apr-16 0:59
Sonhospa25-Apr-16 0:59 
QuestionHow can i make the official VB.net TCP async Example work ?! Pin
Ghassan Mohamed Yousif20-Apr-16 23:53
Ghassan Mohamed Yousif20-Apr-16 23:53 
AnswerRe: How can i make the official VB.net TCP async Example work ?! Pin
Dave Kreskowiak21-Apr-16 2:09
mveDave Kreskowiak21-Apr-16 2:09 
GeneralRe: How can i make the official VB.net TCP async Example work ?! Pin
Ghassan Mohamed Yousif22-Apr-16 9:45
Ghassan Mohamed Yousif22-Apr-16 9:45 
GeneralRe: How can i make the official VB.net TCP async Example work ?! Pin
Dave Kreskowiak22-Apr-16 15:57
mveDave Kreskowiak22-Apr-16 15:57 
QuestionConversion from string "" to type 'Integer' is not valid Pin
kishore-201620-Apr-16 1:46
kishore-201620-Apr-16 1:46 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
Richard MacCutchan20-Apr-16 2:02
mveRichard MacCutchan20-Apr-16 2:02 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
Sascha Lefèvre20-Apr-16 2:29
professionalSascha Lefèvre20-Apr-16 2:29 
AnswerRe: Conversion from string "" to type 'Integer' is not valid Pin
CHill6020-Apr-16 2:37
mveCHill6020-Apr-16 2:37 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
kishore-201621-Apr-16 5:44
kishore-201621-Apr-16 5:44 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
Richard Deeming21-Apr-16 5:54
mveRichard Deeming21-Apr-16 5:54 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
CHill6021-Apr-16 6:17
mveCHill6021-Apr-16 6:17 
GeneralRe: Conversion from string "" to type 'Integer' is not valid Pin
kishore-201621-Apr-16 6:26
kishore-201621-Apr-16 6:26 
QuestionVB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
ThePotty120-Apr-16 1:07
ThePotty120-Apr-16 1:07 
AnswerRe: VB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
Dave Kreskowiak20-Apr-16 4:18
mveDave Kreskowiak20-Apr-16 4:18 
AnswerRe: VB6 File not found: 'C:\Users\???\AppData\Local\Temp\VBB685.tmp' Pin
CHill6021-Apr-16 6:13
mveCHill6021-Apr-16 6:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.