none
Error -2147024894

    Question

  • I am in the process of attempting to remove a folder that is located in c:\program files. I am successful with removing the client but the folder remains for some reason. It is empty and I have verfied that the client is unistalled. Why would the folder remain? Also, when attempting to remove the fodler with command line rmdir /s /q c:program files\anywhere+, "An error occurred while preparing to run the program for advertisement "HSC2012C" ("HSC00004" - "Remove Folder"). The operating system reported error -2147024894: The system cannot find the file specified. Additional program properties: Command line: RMDIR /S /Q C:\PROGRAM FILES\ANYWHERE+ Working directory: Drive letter (? = any): Possible cause: This message most commonly occurs when the program's command-line executable file could not be found, when a required drive letter connection to a distribution point could not be established, or when the program is configured to use the SMS Software Installation Account but the account is not specified, could not be found, or does not have the appropriate permissions. Solution: Check each of the items listed above"

     

    any direction is greatly appreciated...


    Jen Stevens
    Tuesday, September 13, 2011 3:29 PM

Answers

  • Try prefixing the command line with "cmd /c" (without quotes) plus add quotes since 'program files' contains a space character.
    cmd /c rmdir /s /q "c:program files\anywhere+"
    Torsten Meringer | http://www.mssccmfaq.de
    Tuesday, September 13, 2011 3:31 PM
    Moderator
  • thank you all!!! jason was right i forgot the backslash.... it works now!! thank you thank you!
    Jen Stevens
    • Marked as answer by Jen St3v3ns Tuesday, September 13, 2011 7:14 PM
    Tuesday, September 13, 2011 7:13 PM

All replies

  • Try prefixing the command line with "cmd /c" (without quotes) plus add quotes since 'program files' contains a space character.
    cmd /c rmdir /s /q "c:program files\anywhere+"
    Torsten Meringer | http://www.mssccmfaq.de
    Tuesday, September 13, 2011 3:31 PM
    Moderator
  •  

    do you mean try this? see below... (sorry I am a newbie) thank you for your help...

    RMDIR /S /Q cmd/ C:\PROGRAM FILES\ANYWHERE+


    Jen Stevens
    Tuesday, September 13, 2011 3:36 PM
  • cmd /c rmdir /s /q "c:program files\anywhere+"

    See above ...
    Torsten Meringer | http://www.mssccmfaq.de
    Tuesday, September 13, 2011 3:45 PM
    Moderator
  • well i think i am headed in the right direction with your help.... but i am getting a different error now. see below: The program for advertisement "HSC2012E" failed ("HSC00004" - "Remove Folder"). A failure exit code of 3 was returned. User context: NT AUTHORITY\SYSTEM Possible cause: Systems Management Server (SMS) determines status for each program it executes. If SMS cannot find or correlate any installation status Management Information Format (MIF) files for the program, it uses the program's exit code to determine status. An exit code of 3 is considered a failure. Solution: For more information on the exit code, refer to the documentation for the program you are distributing.

    not sure why this is being so difficult, all i am trying to do is remove an empty folder...  :)

     

     


    Jen Stevens
    Tuesday, September 13, 2011 3:49 PM
  • Error 3 translates to "The system cannot find the path specified."
    Any chance that you're dealing with on x64 OS?
    Torsten Meringer | http://www.mssccmfaq.de
    Tuesday, September 13, 2011 4:25 PM
    Moderator
  • nope, its x86, why do you ask? what are you thinking?
    Jen Stevens
    Tuesday, September 13, 2011 4:56 PM
  • If it's x64, the program files folder path will be different.

     


    Anoop C Nair - Twitter @anoopmannur

    MY BLOG:  http://anoopmannur.wordpress.com

    SCCM Professionals

    This posting is provided AS-IS with no warranties/guarantees and confers no rights.

    Tuesday, September 13, 2011 5:29 PM
  • no its 32...what i noticed was that i can manually run these command lines... just when it is advertised it will not work.... i am creating a program...should i be doing this another way possibly?
    Jen Stevens
    Tuesday, September 13, 2011 6:32 PM
  • Not sure if this is a typo isolated to the forum, but it should be

    cmd /c rmdir /s /q "c:\program files\anywhere+"

    with a backslash after the c:

    Without that backslash, you will get a path not found error.


    Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys
    Tuesday, September 13, 2011 6:32 PM
    Moderator
  • thank you all!!! jason was right i forgot the backslash.... it works now!! thank you thank you!
    Jen Stevens
    • Marked as answer by Jen St3v3ns Tuesday, September 13, 2011 7:14 PM
    Tuesday, September 13, 2011 7:13 PM