RBrown1375 Posted November 14, 2012 Posted November 14, 2012 I have gone through the help file and tried everything it shows samples on for my script except I can't get it to del a folder and its contents. I've tried DirRemove and FileDelete and nothing. Here is my code and I was wondering if I could get another eye on this. The goal of this script is to uninstall CCMSetup from Servers (Win 2003 and 2008r2) then I want to remove the CCMSetup folder and its files and this is where is fails. I've been concentrating on Win2k3 first then I'll move over to Win2k8r2. Thanks #RequireAdmin ; Get the OS version number without an API call. Local $sFldr1 = "C:\Windows\System32\ccmsetup\" ;Local $sFldr2 = "" Func _OSVersion() Return RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "CurrentVersion") EndFunc ;==>_OSVersion If @OSVersion = "WIN_2003" Then RunWait(@WindowsDir & "\System32\CCMSetup\CCMSetup.exe /uninstall") Sleep(3000) DirRemove($sFldr1, 1) EndIf If @OSVersion = "WIN_2008R2" Then MsgBox(0, "@OSVersion()", "BatMan") EndIf ;==> End If
JohnOne Posted November 14, 2012 Posted November 14, 2012 Does this line not already remove it? RunWait(@WindowsDir & "System32CCMSetupCCMSetup.exe /uninstall") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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