Running REMPROF.EXE from batch file

Comments

6 comments

  • TonsOFun

    you may want to try delprof2.exe instead. 

    at least, this is what i use, and it works no problems at all. 

    ----- Start script------

    c:
    cd \
    mkdir temp12
    xcopy \\pyramid\sccm\software_package\scripts\delprof2.exe /Y /E /Q /H C:\temp12
    c:\temp12\delprof2.exe /id:<username> /u /q
    del c:\temp12\delprof2.exe
    rmdir c:\temp12

    ----- End Script------

     

    I've attached the exe... dunno if it's allowed here... as i don't remember which website i got it from. 

    0
    Comment actions Permalink
  • TonsOFun

    found it. the website that is: http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/

    good luck. 

    0
    Comment actions Permalink
  • khanhibus

    Thanks! We'll give it a go.

     

    So it looks like your script copies delprof2.exe to the local computer and runs the command from there. I wonder if that'll work for remprof.exe as well.

    0
    Comment actions Permalink
  • TonsOFun

    yea... personally haven't used the "path" command in awhile. and haven't tried using it with pdq deploy either. 

    just copying it to the target machine then running it from there seems to work pretty well for me thus far. 

    if you search throughout this forum, there's a way to use that batch file, and input a line of code that will output any errors to a text file. 

    as for the permissions issue above, the service account should have full admin rights to the box. 

    I don't believe just giving access to the folders will suffice during a profile deletion? i could be wrong. just conceptually thinking of course. 

    0
    Comment actions Permalink
  • Adam Ruth

    Error 2 is usually (but not always) "File not found" so there may be an issue with some of what's available in the environment when running as a service.  When running batch files it's quite often useful to capture the output from all of the commands to see which one of them is giving you the error and to see if there's a message to go along with it.  You can add the following to the parameters in the package:

    > c:\pdqout.txt 2>&1

    This will redirect all output to the file c:\pdqout.txt on the target computer.  Most likely one of the commands will have some more detailed error information that can point to what file (or registry key) it's not finding.

    0
    Comment actions Permalink
  • Eduardo Trevino Jr.

    download "delprof.exe"

    in batch:

    -------------------------------------------------------------------------

    start /wait \\[server]\[share]\delprof.exe /d:[120] /Q /i

    -------------------------------------------------------------------------

    change [days] number. erase all profiles 120+ days old.

    0
    Comment actions Permalink

Please sign in to leave a comment.