Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Update soon and AppleScript to uninstall X

Update soon and AppleScript to uninstall X
Thread Tools
Scott_H
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Apr 4, 2001, 05:45 PM
 
So there was an Apple rep on my campus today. He didn't say much we don't know. In response to an ssh question he said it would be in the update which should come out soon. He made it sound like "this week" kind of soon.


More interesting.

He said that when OS X ships on new boxes this summer there will be an AppleScript to uninstall X. So you get your new box. Boot into 9 and run the AppleScript to delete of all of X.

[This message has been edited by Scott_H (edited 04-04-2001).]
     
HeatMiser
Mac Enthusiast
Join Date: Oct 1999
Status: Offline
Reply With Quote
Apr 4, 2001, 05:55 PM
 
Originally posted by Scott_H:
He said that when OS X ships on new boxes this summer there will be an AppleScript to uninstall X. So you get your new box. Boot into 9 and run the AppleScript to delete of all of X.
How do uninstallers usually work? I guess I've never given this much thought. I mean, what's the difference between creating a small classic app that uninstalls X after you've booted into 9? Less code overhead with the script?

I'm clueless.



------------------
The suspense is terrible...I hope it'll last.
I am the harsh nemesis of all that is unclean!
     
gorgonzola
Admin Emeritus
Join Date: Nov 2000
Location: New Yawk
Status: Offline
Reply With Quote
Apr 4, 2001, 06:00 PM
 
Either way, it's good to know that (a) the update will be out soon and (b) there will be some kind of uninstaller. Wiping the drive gets annoying if you have other stuff on there. Not very "user friendly" either.

And as for the app vs script thing, I don't know why they chose that. The functionality would be the same either way.

------------------
the oddball newsletter
------------------
it's only after you lose everything that you're free to do anything
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
     
Schmoo
Guest
Status:
Reply With Quote
Apr 4, 2001, 10:10 PM
 
TEST TEST TEST TEST TEST TEST TEST

Code:
property root_items : {"bin", "dev", "Network", "private", � "sbin", "usr", "Volumes", ".DS_Store", ".hidden", "cores", � "etc", "tmp", "var", "AppleInternal", "Applications", "Developer", � "Library", "mach", "mach.sym", "mac_kernel", "System", "Users"}
     
Scrod
Mac Elite
Join Date: Jan 2001
Location: Sad King Billy's Monument on Hyperion
Status: Offline
Reply With Quote
Apr 4, 2001, 10:42 PM
 
I don't see what the big deal about needing an uninstaller is. I "uninstalled" DP4, Public Beta, and build 4K17 manually with a little bit of help from ResEdit. And erasing the disk that OS X is on is TOTALLY unnecessary.
I abused my signature until she cried.
     
Schmoo
Guest
Status:
Reply With Quote
Apr 5, 2001, 10:44 AM
 
If you've installed Mac OS X over Mac OS 9.1 on a drive and want to remove the Mac OS X items from the drive:

- reboot into Mac OS 9.1
- paste this script into a new script window in the script editor and save it as a classic applet. quit script editor.
- run this script

All Mac OS X items will be placed in the trash.

BEFORE YOU EMPTY THE TRASH, MAKE SURE THAT IT DOES NOT CONTAIN ITEMS YOU WANT TO KEEP!

Code:
property root_items : {"bin", "dev", "Network", "private", � "sbin", "usr", "Volumes", ".DS_Store", ".hidden", "cores", � "etc", "tmp", "var", "Applications", "Developer", � "Library", "mach", "mach.sym", "mac_kernel", "System", "Users"} property systemfolder_items : {"Classic", "Classic Support", � "Classic Support UI", "ProxyApp"} tell application "Finder" activate try set this_version to the version as string if this_version does not start with "9" or � this_version is not greater than or equal to "9.1" then � error "This script requires a Mac OS 9.x system greater than 9.0.4." display dialog "This script will move Mac OS X items from the startup disk to the trash." repeat with i from 1 to the count of the root_items set this_item to item i of the root_items if exists (item this_item of the startup disk) then delete item this_item of the startup disk end if end repeat repeat with i from 1 to the count of the systemfolder_items set this_item to item i of the systemfolder_items if exists (item this_item of the system folder) then delete item this_item of the system folder end if end repeat beep display dialog "The Mac OS X items have been placed in the Trash." on error error_message number error_number if the error_number is not -128 then beep display dialog error_message buttons {"Cancel"} default button 1 end if end try end tell
     
Kosmo
Senior User
Join Date: Apr 1999
Location: Bow, NH USA
Status: Offline
Reply With Quote
Apr 5, 2001, 01:57 PM
 
God, I love you guys that write AppleScript!!!

This applet worked great! I can't thank you enough!!! Where do i send the check

Kosmo


http://www.macnet2.com
     
Scott_H  (op)
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Apr 5, 2001, 02:19 PM
 
You can't include "Users" because it uses the OS 9 multi-users "Users" folder. Much more safe to leave that one out.
     
Lord Kronos
Senior User
Join Date: Mar 2001
Location: Earth
Status: Offline
Reply With Quote
Apr 5, 2001, 04:24 PM
 
One little mistake: it's 'mach_kernel' and not 'mac_kernel'. But it sure is a nice script .

Edit: you may also add '.Trashes' and '.vol' to the list.

------------------
"Ein kleiner Mensch stirbt - nur zum Schein"

[This message has been edited by Lord Kronos (edited 04-05-2001).]
"Sing you fools ! But you got it wrong..."
     
Schmoo
Guest
Status:
Reply With Quote
Apr 5, 2001, 10:02 PM
 
Here's a version with your suggested changes. The script will now ask if you want to delete the Users folder.

Code:
property root_items : {"bin", "dev", "Network", "private", � "sbin", "usr", "Volumes", ".DS_Store", ".hidden", "cores", � "etc", "tmp", "var", "Applications", "Developer", � "Library", "mach", "mach.sym", "mach_kernel", "System", � ".Trashes", "Users", ".vol"} property systemfolder_items : {"Classic", "Classic Support", � "Classic Support UI", "ProxyApp"} tell application "Finder" activate try set this_version to the version as string if this_version does not start with "9" or � this_version is not greater than or equal to "9.1" then � error "This script requires a Mac OS 9.x system greater than 9.0.4." display dialog "This script will move Mac OS X items from the startup disk to the trash." with icon 2 display dialog "Should this script delete the Users folder?" buttons {"Cancel", "Yes", "No"} default button 3 set the users_flag to the button returned of the result repeat with i from 1 to the count of the root_items set this_item to item i of the root_items if this_item is not "Users" or � the users_flag is "Yes" then if exists (item this_item of the startup disk) then delete item this_item of the startup disk end if end if end repeat repeat with i from 1 to the count of the systemfolder_items set this_item to item i of the systemfolder_items if exists (item this_item of the system folder) then delete item this_item of the system folder end if end repeat beep display dialog "The Mac OS X items have been placed in the Trash." on error error_message number error_number if the error_number is not -128 then beep display dialog error_message buttons {"Cancel"} default button 1 end if end try end tell
     
BigRoadBlues
Guest
Status:
Reply With Quote
May 31, 2001, 01:18 AM
 
I used the revised script and it seems to have worked fine -- up to a point.

When I rebooted my g4 there's a blue folder with a blinking questionmark. It stays on screen for a few seconds and then everything goes over to 9.1 and everything starts up fine.

What's THAT little drama about?

Some points:

(1) Did not delete the User folder
(2) Could not locate the mach_kernel file anywhere before going through the script and didn't see it in the trash.
(3) The problem I was having was that the startup disk feature in 9.1 suddenly vanished -- meaning I couldn't find any way to launch OS X. That was the thing that made me determined to get it off my computer. If I could have it there and update from time to time as apple releases something and eventually move toward using it, I suppose I would. But having it there without any advantage is senseless.

Anyway, that's my situation. Any answers are GREATLY appreciated!!

Big Road Blues http://www.bigroadblues.com
[email protected]
     
Tim Simmons
Guest
Status:
Reply With Quote
May 31, 2001, 02:28 AM
 
Open the startup disk control panel in Mac OS 9 and select the startup disk with the Mac OS 9 system folder. That should solve the problem of the blinking folder.
     
mnater
Guest
Status:
Reply With Quote
May 31, 2001, 04:58 AM
 
Hello Schmoo

Can I post your AppleScript on my Mac OS X-Site (http://www.thinkmacosx.com/)? There are a lot of german users asking if there is a simple way to remove Mac OS X. An Your script is a really nice and simple way to do it...

Thanx, Mathias Nater
     
mumble
Dedicated MacNNer
Join Date: Nov 2000
Location: Trolling for Meader
Status: Offline
Reply With Quote
May 31, 2001, 08:07 AM
 
Originally posted by Lord Kronos:
One little mistake: it's 'mach_kernel' and not 'mac_kernel'. But it sure is a nice script .
And the other little mistake is that he left AppleInternal in his first list
     
BigRoadBlues
Guest
Status:
Reply With Quote
May 31, 2001, 11:30 AM
 
Thanks to all for the email and help -- one problem remains, however, and it's the one that sent me down the rabbit hole to begin with!

When I go to control panel and select Startup Disk, I have only two choices up there -- File and Help. Under File there is only CLOSE and QUIT. There is no way to change or direct the startup. I noticed that happened out of the blue, I'd always been able to switch over to OS X via that control panel. I tried downloading the file again from apple but got something involving a "shrink wrap" error, as I recall.

So, I think I've got OSX off -- except for the USER folder , and I suspect there's a way to prune that! But I don't seem to have the option to stipulate that 9.1 is the system to start with.

Argh!

Brian
     
Scott_H  (op)
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
May 31, 2001, 11:47 PM
 
If you are booted into the 9 from the harddisk you should see you own HD icon in the startup disk control panel. Just highlight it and close the window. That should take care of any flashing "?". If the icon is not there ...???? You may want to do a restore in place install of OS 9.


The "User" folder is where OS X puts all the folders for the users. OS 9 uses the same "User" folder for OS 9 multi-user. If you are not using OS 9 mutli-user AND there's no files in there you want you can trash the whole thing. It not going to cause any trouble either way.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:19 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,