Computing.Net > Forums > Windows XP > Batch File Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch File Help

Reply to Message Icon

Name: MFiendD
Date: July 28, 2007 at 21:04:36 Pacific
OS: XP
CPU/Ram: N/A
Product: N/A
Comment:

I created a batch file to delete the profile data of our companies propriatary application. The issue we have is that the profile for some users becomes corrupt so for a work around I attempted to create a batch file that will make things easier for myself when dealing with hundreds of users.

First I need to verify that the operating system is XP then from there to have the script jump to the correct spot within the script to begin removing the profile.

I also setup the script to verify that the profile files where located and if not then to notify via echo and then close on user input.

The portion within the script that checks for the profile data is not working. The script goes on to the end.

Any help is greatly appreciated.

Batch File:

@ECHO OFF
VER | FIND "XP" > Nul
IF NOT ERRORLEVEL 1 GOTO End

IF EXIST %USERPROFILE%\Local Settings\Application Data\PTS\Callup.Console.Settings.data (
GOTO NT
) ELSE (
GOTO NoProfile
)

:NT
TASKKILL /IM PTSCallup.PTSCallupConsole.exe /F
@ECHO PTS Callup Console shutdown successfully...
@ECHO Deleting the PTS profile on this machine...
RD "%USERPROFILE%\Local Settings\Application Data\PTS" /S /Q
RD "%USERPROFILE%\Local Settings\Application Data\PTS VER" /S /Q
@ECHO PTS Callup Console profile deleted successfully...
@ECHO Please launch the PTS Callup Console by clicking on the CALLUP icon located on your desktop.
PAUSE
EXIT

:NoProfile
CLS
@ECHO The PTS Callup Console profile was not located on this machine. Please contact your local system administrator.
PAUSE
EXIT

:End
CLS
@ECHO The PTS Callup Console is only compatible with Microsoft Windows XP. If you find this to be an error please contact local system administrator.
PAUSE
EXIT

In advanced thank you for taking the time to read the post,

MFiendD

Ok I'll byte the bit!



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 29, 2007 at 02:09:09 Pacific
Reply:

IF EXIST "%USERPROFILE%\Local Settings\Application Data\PTS\Callup.Console.Settings.data"


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: MFiendD
Date: July 29, 2007 at 11:56:30 Pacific
Reply:

Thank you Mechanix2Go. Everything is working like a charm.

It's always good to have another set of eyes.

Ok I'll byte the bit!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Erratic Behavior backup xp



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch File Help

Batch file help needed... www.computing.net/answers/windows-xp/batch-file-help-needed/163063.html

Dos Batch File HELP! www.computing.net/answers/windows-xp/dos-batch-file-help/163943.html

Batch File Help www.computing.net/answers/windows-xp/batch-file-help/164676.html