Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 27th, 2012, 05:37 PM
ZGorlock ZGorlock is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 6 ZGorlock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 23 sec
Reputation Power: 0
Is this right? (MS-DOS)

I am not a beginner, but I am not very fluent in MS-DOS, so I just wanted someone else to look at this and make sure it will do what it is supposed to before I try anything.

It is an uninstaller for a program I am writing. The program will move it to C:\ and then it will run. The bat file should get the location of the program folder from jarvisloc.jdf and if it wants to store user data from uninstall.tmp (0 to not store, 1 to store). When it is done it deletes itself. Or, at least thats what it is supposed to do. Here it is:

C:\uninstall.bat
------
@echo off
echo uninstalling...
%loc% < C:\WINDOWS\jarvisloc.jdf
!ut! < %loc%\temp\uninstall.tmp
If !ut! EQU 1 (
cd %loc%
copy /y dimscreen.ini C:\dimscreen.ini
copy /y jarvis.ini C:\jarvis.ini
copy /y fractaltype.jdf C:\fractaltype.jdf
copy /y log.jdf C:\log.jdf
copy /y customcmd.bas C:\customcmd.bas
xcopy /y customcmd C:\customcmd\
xcopy /y snapshots C:\snapshots\
)
cd c:
deltree /y %loc%
del /y C:\WINDOWS\jarvisloc.jdf
del /y C:\%homepath%Start Menu\Programs\Startup\startuptime.lnk
del /y C:\%homepath%Start Menu\Programs\Startup\jarvis.lnk
del /y C:\%homepath%Desktop\jarvis.lnk
If !ut! EQU 1 (
cd C:\Program Files
mkdir JARVIS
cd JARVIS
mkdir temp
cd temp
mkdir profile
cd profile
copy /y C:\dimscreen.ini dimscreen.ini
copy /y C:\jarvis.ini jarvis.ini
copy /y C:\fractaltype.jdf fractaltype.jdf
copy /y C:\log.jdf log.jdf
copy /y C:\customcmd.bas customcmd.bas
xcopy /y C:\customcmd customcmd\
xcopy /y C:\snapshots snapshots\
del /y C:\dimscreen.ini
del /y C:\jarvis.ini
del /y C:\fractaltype.jdf
del /y C:\log.jdf
del /y C:\customcmd.bas
deltree /y C:\customcmd
deltree /y C:\snapshots
)
cd c:
del uninstall.bat
exit
-------

Does it do what I think it is supposed to? Also, how could you get the bat file to delay for like 5 seconds at the beginning to give the program time to close and such? Thanks you guys

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Is this right? (MS-DOS)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap