![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | delete folder as admin using vbscript Hi there, I have the following line of a vb script which does not work. oShell.Run "runas /noprofile /user:adminuser@xxxxxx ""cmd /d /c rd /S / Q \"C:\Dokumente und Einstellungen\All Users\Startmenü\Programme \PowerArchiver 2001\"""" Please note the \ before "C:\Dokumente... which is needed because runas needs the " escaped around the path. How do I escape them correctly? Windows Script Host gives me the error code 800A0401 when running the command at the \´s position. Any help is appreciated. Thanks, J- |
My System Specs![]() |
| | #2 (permalink) |
| | Re: delete folder as admin using vbscript Joerg Gerlach schrieb: Quote: > Hi there, > > I have the following line of a vb script which does not work. > > oShell.Run "runas /noprofile /user:adminuser@xxxxxx ""cmd /d /c rd /S / > Q \"C:\Dokumente und Einstellungen\All Users\Startmenü\Programme > \PowerArchiver 2001\"""" > > Please note the \ before "C:\Dokumente... which is needed because > runas needs the " escaped around the path. > How do I escape them correctly? Windows Script Host gives me the error > code 800A0401 when running the command at the \´s position. > > Any help is appreciated. > > Thanks, > > J- magic incantation should be \"". This short version "runas ""cmd x \""y\""""" gives runas "cmd x \"y\"" |
My System Specs![]() |
| | #3 (permalink) |
| | Re: delete folder as admin using vbscript Works like a charm, thank you very much. =) J- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| VBScript to move file in one folder to many folder | VB Script | |||
| Could I use vbscript to set folder quotas? | VB Script | |||
| merg my acct to admin and delete? | General Discussion | |||
| Admin can't delete files - help please | Vista General | |||
| Can't delete files - says not Admin | Vista account administration | |||