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 i