Jump to content

dave

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by dave

  1. Saasems I was already looking into adding another tab for net view, just been busy with lots of software rollouts. 5t0n3r I like the change you made and thanks for sharing.
  2. Saasems I was already looking into adding another tab for net view, just been busy with lots of software rollouts.
  3. I created this after seeing screen shots of similar app that is no longer available. It works just fine but wondering if there are some things I could of done differently/more effeciently.
  4. I just wanted to say thanks again to everyone who made this UDF possible. It is now one of my must have UDF's.
  5. Thanks water, I did not catch that before when I went through the thread. It is as expected authentication and now that I see how to connect to ad using alternate user id and pw I am all set. One thing I am unsure of is why the Alternate userid and pw in the adfunctions v3.1.6 do not seem to work.
  6. I am running 3.1.6 it is in thread somewhere but def not on the first page. Can anyone help me out on this, If i run the following logged in minimal AD rights it works, but if I am logged in on a machine as local admin does not work. I also have tried setting the alternate global username and password with no luck. I know this has something to do with right to AD just not sure how to fix, if I run this code as well as others like _ADGetObjectsInOU logged into computer with domain account works as should, but if not logged in with domain account does not seem to work. The only one I can get to work this way is _ADCreateComputer. Error i get when logged in with local admin We intercepted a COM Error! Number is : 000000A9 Windesription is: Variable must be of type 'Object'' Script Line 1029 #include <adfunctions.au3> $SN = 'v300-vmware' ;Check if computer account exists already $PCE = _ADComputerExists($SN) MsgBox(0,"pc was found if #1", $PCE&' '&$SN)
  7. First off thanks to all who have contributed to this UDF as I am finding it to be very useful. I have one small problem that I was hope someone could point me in the right direction. If i run the following logged in minimal AD rights it works, but if I am logged in on a machine as local admin does not work. I also have tried setting the alternate global username and password with no luck. #include <adfunctions.au3> $SN = 'v300-vmware' ;Check if computer account exists already $PCE = _ADComputerExists($SN) MsgBox(0,"pc was found if #1", $PCE&' '&$SN)
  8. I am fairly new to this so my code may be little messy. I currently have the progress bar updating after each part of the install is complete and would like to have an overal progress and another progress bar for each install if I can have the progress update by installer some how. #include <file.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;hides tray icon Opt("TrayIconHide", 1) ;Sets runas username $nm = "username" ;Sets runas domain $dn = "domain" ;Sets runas password $pw = "password" ;Sets jpg for installer $Logo_jpg = @TempDir & "\Logo-au3.jpg" FileInstall("C:\Software Distribution\ikon.jpg", $Logo_jpg, 1) ;checks for vstor $vst = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v2.0.50727", "Install") ;checks for XP SP3 $sp3 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\updates\Windows XP\SP3\KB936929", "Description") ;Checks for windows installer V2 $iv2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\KB893803v2", "PackageName") ;Check for DotNet 2.0 $dt2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727", "Install") ;Sets apps dir $apps = "C:\windows\system32\drivers\apps\" ;Sets Onstarget install path $OT = "C:\Windows\System32\Drivers\Apps\msoffice2k7pp\OnTarget\" Sleep(2000) ;creates gui with progress bar for install GUICreate( "On Target 2007 plug-in installation" , 735 , 250, 0, 0) GUICtrlCreatePic( $Logo_jpg, 0, 0, 735, 250) GUISetBkColor (0xFFFFFF) GUISetStyle(BitOR($WS_POPUPWINDOW, $DS_SETFOREGROUND), @SW_SHOW) $label1 = GUICtrlCreateLabel( "",240, 12, 300, 20) $label2 = GUICtrlCreateLabel( "",240, 30, 300, 18) $progress1 = GUICtrlCreateProgress( 240, 54, 300, 20) $label3 = GUICtrlCreateLabel( "",240, 80, 150, 18) ;Set gui state to show GUISetState() WinSetOnTop("On Target 2007 plug-in installation", "" ,1) ;updates progress bar GUICtrlSetData($label1, "Starting On Target for Outlook 2007 install") GUICtrlSetData($label2, "Extracting install files") GUICtrlSetData($progress1, 0) GUICtrlSetData($label3, "Installation 0% Complete") ;installs files FileInstall("C:\Software Distribution\OnTarget2k7 Software\OnTarget2k7.exe", "C:\Windows\temp\OnTarget2k7.exe", 1) If IsAdmin() Then RunWait("C:\Windows\temp\OnTarget2k7.exe") Else RunAsWait( $nm, $dn, $pw, 0,"C:\Windows\temp\OnTarget2k7.exe") EndIf ;if not admin changes permissions on log file If Not IsAdmin() Then RunAsWait($nm, $dn, $pw, 0, 'cacls "C:\Windows\System32\Drivers\Apps\msoffice2k7pp\OnTarget\install.log" /E /C /P "power users":C /T', $OT, @SW_HIDE) EndIf ;updates progress bar GUICtrlSetData($label1, "Checking for windows installer version") GUICtrlSetData($label2, "and installing if not installed already") GUICtrlSetData($progress1, 15) GUICtrlSetData($label3, "Installation 15% Complete") Sleep(2000) ;Checks for var retrieved from key If $sp3 = "Windows XP Service Pack 3" Then _FileWriteLog($OT & "Install.log","XP SP3 was found ") ElseIf $sp3 <> "Windows XP Service Pack 3" Then _FileWriteLog($OT & "Install.log","XP SP3 was not found now checking for windows installer version") If $iv2 = "Windows Installer 3.1 (KB893803)" Then _FileWriteLog($OT & "Install.log","Windows installer version 3.1 was found ") ElseIf $iv2 <> "Windows Installer 3.1 (KB893803)" Then If IsAdmin() Then $iv31 = RunWait("WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart", $OT, @SW_HIDE) Else $iv31 = RunAsWait($nm, $dn, $pw, 0, "WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart", $OT, @SW_HIDE) EndIf _FileWriteLog($OT & "Install.log","Windows installer V2 installer with an error code of " & $iv31) If $iv31 <> 0 Then Exit $iv31 EndIf EndIf Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "Checking to see if dotnet 2.0 is installed") GUICtrlSetData($label2, "and installing if not installed already") GUICtrlSetData($progress1, 25) GUICtrlSetData($label3, "Installation 25% Complete") Sleep(2000) ;Checks for DotNet 2.0 If $dt2 = 1 Then _FileWriteLog($OT & "Install.log","DotNet 2.0 was found ") Else If IsAdmin() Then RunWait( "C:\Windows\System32\Drivers\Apps\OnTarget2k3Plug-in\dotnetfx.exe " & "/t:C:\Windows\System32\Drivers\Apps\OnTarget2k3Plug-in\dotnet2 /C") $dt20 = RunWait($OT & "dotnet2\install /q") Else RunAsWait($nm, $dn, $pw, 0, "C:\Windows\System32\Drivers\Apps\OnTarget2k3Plug-in\dotnetfx.exe " & "/t:C:\Windows\System32\Drivers\Apps\OnTarget2k3Plug-in\dotnet2 /C") $dt20 = RunAsWait($nm, $dn, $pw, 0, $OT & "dotnet2\install /q") EndIf _FileWriteLog($OT & "Install.log","DotNet 2.0 was installed with an error code of " & $dt20) If $dt20 <> 0 Then Exit $dt20 EndIf Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "Checking to make sure outlook 2007 is installed") GUICtrlSetData($label2, "in order to continue with install.") GUICtrlSetData($progress1, 30) GUICtrlSetData($label3, "Installation 30% Complete") Sleep(2000) ;Checks for outlook 2003 If FileExists("C:\Program Files\Microsoft Office\Office12\outlook.exe") then _FileWriteLog($OT & "Install.log","Outlook 2007 found install will continue") ElseIf FileExists("C:\Program Files\Microsoft Office\Office11\outlook.exe") Then _FileWriteLog($OT & "Install.log","Outlook 2003 found installation aborted") MsgBox(0, "OnTarget 2007 Plug-in", "Outlook 2007 was not found install aborting", 180) Exit(1) EndIf Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "Verified outlook 2007 was installed,") GUICtrlSetData($label2, "now starting VSTOR install.") GUICtrlSetData($progress1, 50) GUICtrlSetData($label3, "Installation 50% Complete") Sleep(2000) If $vst = 1 Then _FileWriteLog($OT & "Install.log","VSTOR found") Else If IsAdmin() Then $vst = RunWait( $OT & "VSTOR.exe /q", $OT, @SW_HIDE) Else $vst = RunAsWait($nm, $dn, $pw, 0, $OT & "VSTOR.exe /q", $OT, @SW_HIDE) EndIf _FileWriteLog($OT & "Install.log","VSTOR install completed with an Error code of_" & $vst) If $vst <> 0 Then Exit $vst EndIf Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "VSTOR was installed successfully,") GUICtrlSetData($label2, "now starting 2007 PIA install.") GUICtrlSetData($progress1, 70) GUICtrlSetData($label3, "Installation 70% Complete") Sleep(2000) If IsAdmin() Then $pia = RunWait( "msiexec /i o2007pia.msi /qn", $OT, @SW_HIDE) Else $pia = RunAsWait($nm, $dn, $pw, 0, "msiexec /i o2007pia.msi /qn", $OT, @SW_HIDE) EndIf _FileWriteLog($OT & "Install.log","Office 2007 PIA install completed with an Error code of_" & $pia) If $pia <> 0 Then Exit $pia Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "2007 PIA was installed successfully,") GUICtrlSetData($label2, "now starting 2007 On Target plug-in install.") GUICtrlSetData($progress1, 90) GUICtrlSetData($label3, "Installation 90% Complete") Sleep(2000) If IsAdmin() Then $oai = RunWait( "msiexec /i ikon.addins.msi /qn", $OT, @SW_HIDE) Else $oai = RunAsWait($nm, $dn, $pw, 0, "msiexec /i ikon.addins.msi /qn", $OT, @SW_HIDE) EndIf _FileWriteLog($OT & "Install.log","On Target plug-in for outlook 2003 install completed with an Error code of_" & $oai) If $oai <> 0 Then Exit $oai Sleep(2000) ;updates progress bar GUICtrlSetData($label1, "2007 On Target plug-in was installed successfully,") GUICtrlSetData($label2, "On Target plug-in has been installed along with all prerequisites.") GUICtrlSetData($progress1, 100) GUICtrlSetData($label3, "Installation 100% Complete") Sleep(2000) GUIDelete() MsgBox(0, "On Target plug-in for 2007", "Installation is complete, restart Outlook to activate plug-in") Exit
  9. I've created an installer for few programs and run them silent, what I would like to know is if it is possible to update progress bar in my autoit gui from the exe or msi that is being installed silently in my script. Thanks in advance for anyone that might be able to answer this.
  10. Thanks for welcoming me, so far I am impressed with what autoit can do and plan to use it for all of me software deployment needs. Thanks again
  11. I have a script which installs several apps consisting of exe/msi and have one progress bar that shows progress and works as I want. I have not been able to figure out how or if it is even possible to pull progress from each exe/msi and pass that info to a 2nd progress bar, any help would be greatly appreciated. I have already done several searches here and elsewhere which is why I am now posting this question. I would also like to add that I am very new to AutoIT, but since starting to use it 2 weeks ago it is now my primary scripting tool for all of my software deployments using LANDesk. Thanks in advance for any help or suggestions.
×
×
  • Create New...