Jump to content
Sign in to follow this  

INetGet not working under Windows 7

Recommended Posts

Hello autoitees

So this is my deployment script for McAfee Agent. It works flawlessly on XP, on 7 however it gets stuck.. It doesn't download the agent file anyway, is there a way to track where it gets stuck and why ?

Step-by-step the progress was, on 7, that it successfully checks for OS version, adds firewall exception and that's it. FramePkg isn't anywhere. First I thought perhaps C:Temp is protected somehow under 7, so I tried @desktopdir and @tempdir too. No change.

As for the 9 in the of InetGet.. I didn't use any additional parameters at first, just remote and local file, added it later. Didn't change anything.

If I copy the full ftp address to IE, it downloads the fail as it should.

;Check if XP or 7
$oscheck = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName")
   If $oscheck = "Microsoft Windows XP" Then
      ;Add XP firewall exception for program
      RunAsWait("admin_user",".","admin_pass",0,@ComSpec & " /c netsh firewall add allowedprogram C:\TEMP\Agent_Deployment_Script.exe ADS ENABLE","",@SW_HIDE)
   ElseIf $oscheck = "Windows 7 Professional" Then
      ;Add 7 firewall exception for program
      RunAs("admin_user",".","admin_pass",0,@ComSpec & " /c netsh advfirewall firewall add rule name=ADS dir=in profile=any action=allow program=C:\TEMP\Agent_Deployment_Script.exe enable=yes","",@SW_HIDE)
;Download latest Agent
InetGet("ftp://ftpuser:ftppass@ftp.domain.xx/Current/EPOAGENT3000/Install/0409/FramePkg.exe", "C:\TEMP\FramePkg.exe", 9)
If $oscheck = "Microsoft Windows XP" Then
   ;If Windows Security window appears
   If WinActive("Windows Security Alert") Then
   ;Click OK
   ControlClick("Windows Security Alert","","Button2")
;Run Agent as administrator
RunAs("admin_user",".","admin_pass",0,@ComSpec & " /c C:\TEMP\FramePkg.exe /install=agent /CustomProps1=""customprop""","",@SW_HIDE)

Update1 I made a separate single lined autoit executable containing the INetGet line and that didn't work either, has to be something wrong with that line of code.

Edited by sirius4k

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...