lowbred Posted April 25, 2015 Share Posted April 25, 2015 I can't seem to figure out how to encapsulate the file path... Help pls. RunWait(@ComSpec & ' "/c" "schtasks" "/create" "/tn" "Mytask-' & @UserName & '" "/tr" "' & FileGetShortName(@ScriptFullPath) & '" "/sc" "ONLOGON" "/ru" "' & @UserName & '" "/it" "/rl" "HIGHEST"', @SystemDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
iamtheky Posted April 25, 2015 Share Posted April 25, 2015 msgbox(0, 'What Yours Looks Like' , @ComSpec & ' "/c" "schtasks" "/create" "/tn" "Mytask-' & @UserName & '" "/tr" "' & FileGetShortName(@ScriptFullPath) & '" "/sc" "ONLOGON" "/ru" "' & @UserName & '" "/it" "/rl" "HIGHEST"', @SystemDir, @SW_HIDE) msgbox(0, 'Probably Closer' , @ComSpec & '/c schtasks /create /tn Mytask-' & @UserName & ' /tr "' & FileGetShortName(@ScriptFullPath) & '" /sc ONLOGON /ru ' & @UserName & ' /it /rl "HIGHEST"', @SystemDir, @SW_HIDE) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
lowbred Posted April 25, 2015 Author Share Posted April 25, 2015 That's a no go my friend... Link to comment Share on other sites More sharing options...
lowbred Posted April 25, 2015 Author Share Posted April 25, 2015 boththose, thanks for lookin' out for me but I got it. RunWait(@ComSpec & ' "/c" "schtasks" "/create" "/tn" "Mytask-' & @UserName & '" "/tr" """' & FileGetShortName(@ScriptFullPath) & '""" "/sc" "ONLOGON" "/ru" "' & @UserName & '" "/it" "/rl" "HIGHEST"', @SystemDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now