MrEd Posted October 29, 2007 Posted October 29, 2007 Just when I thought I had the RunAsSet figured out... I am receiving the dreaded Line -1: Error: Unable to execute the external program The directory name is invalid Here is the code If FileExists(@StartupCommonDir & "\Windows Desktop Search.lnk") Then $fileToDelete = @StartupCommonDir & "\Windows Desktop Search.lnk" RunAsSet("Administrator",@ComputerName,"password",0) Run(@ComSpec & " /c " & "del " '"' & $fileToDelete & '"', "", @SW_HIDE) EndIf I first tried fileDelete(), then without the variable by building the path to the file on the run line and finally tried making the path to the file a variable. Why Microsoft thought their search bar was a critical update is beyond my be the users are screaming. Thanks for any assistance. BTW I have figured out the RunAsSet for installing files from a network share. I will be searching for my original post and adding what I came up with. Mr Ed
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