CyberSlug Posted March 6, 2008 Posted March 6, 2008 I have some compiled AutoIt scripts that run from a network drive. The scripts worked fine on XP. With Vista, the scripts would only work if run locally. (UAC is disabled; I think the issue was with some nested RunAs magic and how Vista handles credentials.) Anyway, the following fixed all my scripts that broke with Vista: If FileGetLongName(@TempDir) <> FileGetLongName(@ScriptDir) Then FileCopy(@ScriptName, @TempDir & "\" & @ScriptName) Run(@TempDir & "\" & @ScriptName) Exit EndIf ;This script is running locally now. MsgBox(0x1000, "Test", "Running locally now" & @LF & @ScriptDir) ; Optionally use the _SelfDelete() UDF to clean up after self... P.S. It's been too long since I've been on the forums! Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
GEOSoft Posted March 6, 2008 Posted March 6, 2008 I have some compiled AutoIt scripts that run from a network drive. The scripts worked fine on XP. With Vista, the scripts would only work if run locally. (UAC is disabled; I think the issue was with some nested RunAs magic and how Vista handles credentials.)Anyway, the following fixed all my scripts that broke with Vista:Good solution CS. Thanks.P.S. It's been too long since I've been on the forums!You bet it has. Welcome back. And yes, your sig does need a minor update. It looks like it's from 3 years ago. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Richard Robertson Posted March 7, 2008 Posted March 7, 2008 That's interesting. It took me a moment to figure out the first If statement, but it's pretty sound.
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