Jump to content

heinst

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by heinst

  1. Great. That's a good start. I can improve upon it

    Here you go https://dl.dropbox.com/u/17946577/Restart%20to%20Windows.alfredworkflow I did a few things. I changed the code so that it will always reboot to the drive no matter the location, but it has to be named BOOTCAMP. I also Changed the post notification to report an error, because if it does it correctly the OS won't have time to display a notification so having the notification telling you what it was doing was pointless. I also changed the description of what it would do and I changed it to run faster in the background using the osascript. Finally, I added me to the list of people who it was made by, since I think i deserve a little credit.  ;)

  2. diskutil info BOOTCAMP gives me what I want. I dont know how to parse that output and just get /dev/disks0p4 out of it for example (in bash).

    I figured out a way. just need to figure out how to implement it. Itll be done tomorrow. Works through applescript editor, just not when called using alfred.

  3. 
    tell application "System Events"
    	set theText to name of current user
    end tell
    display dialog theText default answer "" with hidden answer
    set the adminpass to the text returned of the result
    
    tell application "Finder"
    	set iconPath to (get name of startup disk) & ":Applications:Utilities:Boot Camp Assistant.app:Contents:Resources:DA.icns" as alias
    end tell
    
    do shell script "bless -mount /Volumes/BOOTCAMP/ -legacy -setBoot -nextonly; shutdown -r now" password adminpass with administrator privileges
    
    

    I have this applescript that restarts into windows and prompts for admin password before it does so. I can't figure out why it works in the applescript editor perfectly fine, but when run through alfred it doesnt prompt for the password or run at all....thoughts?

×
×
  • Create New...