Jump to content

AlternateExistance

Members
  • Posts

    17
  • Joined

  • Last visited

AlternateExistance's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks JackDinn, that did the trick very nicely! Inverted, you are definitely right about that! Batch is funky but i am working towards getting into something with more meat - namely AutoIT. I have a long way to go it seems... Thanks again, Liam
  2. BTW, ZoneAlarm's AntiVirus (which uses the Kaspersky AV engine) passed the file. As Inverted said, most people don't wish to distribute the file uncompiled. If you have 3000+ users all you need is one of them to mess with the script before it is compiled to potentially cause real problems. JohnMC, i agree that most AV wouldn't check resource info, but i wouldn't be surprised if some check it as an additional measure. I could be wrong though. Liam
  3. Argumentum stated that using UPX sets some AV off, but i have also seen some AV programs (Avira - i think) flag compiled files as malware mentioning "AutoIT" in the malware/quarantine warning. I had assumed this was because the exe's still had AutoIT related info in the file Version information but i could be wrong. Liam
  4. Hi guys, I am more of a batch person but am migrating over to AutoIT as it is far more scalable, however i am currently having difficultly with a small problem. I am having trouble trying to determine the drive letter of a set variable which was set as a directory path. For eg, if $dest = 'Z:\TEMP FILES', how would i go about determining the drive that set variable was using was the Z drive? In batch i would have written the following: @ECHO OFF SET DEST=Z:\TEMP FILES CD /D %DEST% CD\ SET DRIVE=%CD% ECHO THE DRIVE LETTER OF %DEST% FOLDER IS: %DRIVE% Thanks, Liam
  5. The problem turned out to be a RoboCopy issue where RoboCopy would fail if a trailing backslash was used. This code works well (for anyone who is interested): $usbdb_dir = 'C:\Program Files\Robocopy\robocopy.exe' $usbdb_source = 'T:' $usbdb_destination = 'Z:\DAILY BACKUPS\E DRIVE BACKUPS' ShellExecuteWait($usbdb_dir, '"' & $usbdb_source & '" "' & $usbdb_destination & '"' & ' /E /Z /MIR /R:3 /W:5 /XD ' & '"' & $usbdb_source & '\Recycled' & '" "' & $usbdb_source & '\Recycler' & '" "' & $usbdb_source & '\System Volume Information' & '"') Alt
  6. I also meant to say that when i ran the RoboCopy code using MsgBox rather than ShellExecuteWait, it "looks" correct in the popup from what i can see: $usbdb_dir = 'C:\Program Files\Robocopy\robocopy.exe' $usbdb_source = 'T:\' $usbdb_destination = 'Z:\DAILY BACKUPS\E DRIVE BACKUPS\' MsgBox(0, $usbdb_dir, '"' & $usbdb_source & '" "' & $usbdb_destination & '"' & ' /E /Z /MIR /R:3 /W:5 /XD ' & '"' & $usbdb_source & 'Recycled\' & '" "' & $usbdb_source & 'Recycler\' & '" "' & $usbdb_source & 'System Volume Information\' & '"', 60) Maybe i missed something though. Thanks, Alt
  7. I changed the code to allow for the use of source and destination directories with spaces in their names, but i can't quite get it to work properly for some reason. $usbdb_dir = 'C:\Program Files\Robocopy\robocopy.exe' $usbdb_source = 'T:\' $usbdb_destination = 'Z:\DAILY BACKUPS\E DRIVE BACKUPS\' ShellExecuteWait($usbdb_dir, $usbdb_source & ' "' & $usbdb_destination & '"' & ' /E /Z /MIR /R:3 /W:5 /XD ' & '"' & $usbdb_source & 'Recycled\' & '" "' & $usbdb_source & 'Recycler\' & '" "' & $usbdb_source & 'System Volume Information\' & '"') The reason i added $usbdb_source to the ignored directories was that i found that RoboCopy was ignoring all sub folders of $usbdb_source called "RECYCLED", "RECYCLER" and "System Volume Information". If $usbdb_source was a directory rather than the root of the drive, ignoring sub folders named "Recycled" etc may be an issue under certain circumstances. I am aware that if the $usbdb_source is a sub directory of a drive and contains folders called "RECYCLED", "RECYCLER" or "System Volume Information" that those folders will not be copied. After the first issue is resolved, I will need to sit down and work out how to obtain the drive letter of $usbdb_source and set that as a separate variable to be used with $usbdb_source & 'Recycler\' In batch i would have used: ::GET AND SET DRIVE LETTER CD\ set drive=%cd% Thanks again for the help, Alt
  8. Hi Danny, That worked great, thanks. Thanks for adding the extra switches in for RoboCopy too. Much appreciated. Is there any way to use a value which contains spaces in the actual command itself or must it be set as a variable beforehand? So far we have set [$sysvol = 'System Volume Information'] but could 'System Volume Information' be used directly in the actual command instead of $sysvol? Under what circumstances should you use single vs double inverted commas? I wasn't able to find that info in the help file but then again i may have missed it though. Thanks again. Alt
  9. Hi Danny, I am trying to get RoboCopy to "ignore" and not copy the "System Volume Information" folder (and some other folders) using the "/XD" (exclude directory) option. The folders i am trying to get RoboCopy to ignore are: "RECYCLED" "RECYCLER" "System Volume Information" I have successfully ignored the other folders, just not "System Volume Information" which contains spaces. Thanks, Alt
  10. Hi guys, I am a relatively inexperienced AutoIT user and have a quick question regarding a problem i am having using ShellExecuteWait with Robocopy and a value with spaces in it, for a backup script i have been working on. I am sure it is an easy problem for most of you but i would really appreciate some help. This is the code: ShellExecuteWait("robocopy.exe", " " & $usbdb_source & ":\" & " " & $usbdb_destination & " /E /Z /MIR /XD " & $usbdb_source & ":\" & "RECYCLED" & " " & $usbdb_source & ":\" & "RECYCLER" & " " & $usbdb_source & ":\" & "System Volume Information", $usbdb_dir) The problem is with "System Volume Information" and no matter whether i use 1 or 2 sets of single or double quotes, i still can't seem to get it right for use with Robocopy. Robocopy will not accept it due to the spaces in "System Volume Information". I even tried setting "System Volume Information" as a variable with the following attempts 3 attempts (tried separately): $sysvol = "System Volume Information" $sysvol = '"System Volume Information"' $sysvol = ""System Volume Information"" The final code when using "one" of the above was: ShellExecuteWait("robocopy.exe", " " & $usbdb_source & ":\" & " " & $usbdb_destination & " /E /Z /MIR /XD " & $usbdb_source & ":\" & "RECYCLED" & " " & $usbdb_source & ":\" & "RECYCLER" & " " & $usbdb_source & ":\" & $sysvol, $usbdb_dir) Thanks for your help. Alt
  11. Sorry about the big delay in my reply. I have been very busy lately but I really appreciate the welcome, feedback and suggestions. I had better explain in detail what i am trying to do and why. I was originally going to create a couple of different scripts which would launch other applications. The first was going to launch IE, but since then i opted for the more advanced control offered by using IE.au3, but the remaining launcher needs to launch an uninstaller and pass extra parameters to the exe. I originally used batch files for the to launch the uninstaller but the problem is that some users have not installed to the default "%ProgramFiles%" directory which meant the batch can't find the uninstaller. I figured the best option is to read the installation path from a registry String and use that in the launching process. As far as i am aware there is not possible to do this from a batch file so i decided to use AutoIt... plus it looks much nicer than a batch file window. The problem using scripts and executables, is that ZoneAlarm pops up and asks if you want to allow the script/exe to launch a secondary application. This goes for ANY unknown program which launches a secondary application. There are a few exceptions to the rule like using autorun (from a CD etc), the Run command, Command Prompt or a batch file. It is a privilege issue rather than the file being identified as a virus/malicious software. Here is the ZoneAlarm message: "my_launcher.exe is trying to launce C:\Program Files\Some_Program_Directory\Some_Program.exe or use another program to gain access to privileged resources." I tried launching Notepad from both a uncompiled script and a compiled exe but the message continues. Here is my code: $var = RegRead("HKLM\Software\Some_Program_Director\Some_Program", "InstallDirectory") ShellExecute("uninstall.exe", " /parameter", $var) I will be using these scripts/exe's in Windows 2000/XP/Vista Any ideas on what i could do? Are there any alternatives to using "ShellExecute", "Run" or "Run(@ComSpec...)" or is there another way past this problem? Thanks again for your help and suggestions.
  12. Are there any other ways of launching a program other than using "ShellExecute", "Run" or "Run(@ComSpec...)"??? IF there are, then i can try them as well and see if that fixes the problem. If batch files can do it, i don't see why AutoIt can't too. Thanks.
  13. Does anyone know if there a way of using AutoIt to launch a program (like iexplore.exe) without certain firewalls (like ZoneAlarm) halting the running of the script/exe to ask the user whether to allow it to launch a program? If batch files are used instead of AutoIt script/exe then the user is never prompted which is what i need to achieve with AutoIt. Here is what i have tried with AutoIt: ShellExecute("iexplore.exe", @ScriptDir & "\index.html") Run("C:\Program Files\Internet Explorer\iexplore.exe", @ScriptDir & "\index.html") Run(@ComSpec & " /c " & 'start iexplore.exe', "", @SW_HIDE) Here is the working batch file command: start iexplore.exe Does anyone have any ideas about what i could do or could even point me in the right direction? TIA
  14. Thanks for that. I will check it out. Much appreciated.
  15. Ok... I suspect i will have to try and figure out the IE scroll bar myself, but i doubt i am alone with the Firewall problem. I might start a seperate thread for that one though.
×
×
  • Create New...