Jump to content

Syekick

Active Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by Syekick

  1. I'll be making a distribution CD / thumb drive combo and will not know what drive letter the script will run from. Under MSDOS batch file lingo, %CD% would call the drive letter path (%CD%) of the location of the autoit script running and allow me to call other locations. So, how do I do this in Autoit? Help didn't cover this one.
  2. I'm so lost. Heheh I get to the windows screen below but then need to go to the menu tab and select "TAG". Next a drop down appears and I need to select "TAG ALL". Below shows the windows screen at that point with both TAG and the TAG All both shown. The AU3Info tool, which is used to get info from the windows screen, gives me no information about anything on the menu such as TAG. The target pointer from AU3Info will not even pick anything from that line. It's as if it doesn't "see" it because the screen is not selected.
  3. I'm trying to get one DOS run command to "run" after the first closes. The time that #1 will remain open will be variable because of the quantity of documents each user has. When I run the program compiled, #2 must be executing before #1 finishes as I do not get the output file. When run separately, manually, it works fine. 1. Run(@Comspec & ' /c cipher.exe /e /a /s:"' & "C:\Documents and Settings\" & @UserName & "\My Documents" & '"') After the above line executes, fully, and the DOS window closes I need to continue in my program by running: 2. Run(@Comspec & ' /c cipher /x c:\' & @UserName & "_" &@ComputerName & '.pfx', 'c:\') The problem seems to be that 2 starts executing either immediately or too soon. I've added Sleep(500) ;500 milliseconds and between the two and that has not helped. Is there any way to detect when #1 closes so I can then execute #2?
  4. So after a @Comspec the /C closes a dos window and the /K keeps it open (for troubleshooting and such) Gee, I learned somthing today. Thank you!
  5. The following runs and works fine. However, at the end, a DOS Command window stays open. How do I close that puppy? Run(@Comspec & ' /k cipher /x c:\' & @UserName & "_" &@ComputerName & '.pfx', 'c:\') WinWaitActive ("EFS certificate and key backup") Send("{Enter}") Send("{Enter}") Send("{Enter}") ;The window above is the one that stays open. Sleep(100) ;100 milliseconds Run('net.exe use U: "\\testsvr\keysafe"') Sleep(250) ;250 milliseconds FileCopy ("c:\*.pfx", "u:") Sleep(250) ;250 milliseconds FileDelete("c:\*.pfx") Sleep(50) ;50 milliseconds Run("net.exe use /delete U:")
  6. Thank you, everyone, for your help and support. It get's tiresome moving " or / around trying to get syntax right all alone! I think that the , C:\ that was added by Blademonkey gave the tempdir?
  7. That is IT !! You rock!
  8. Both result in "the system can not find the file specified" certutil or username.pfx I don't know which.
  9. Returns: 'DI07Z79.pfx' is not recognized as an internal or external command, operable program or batch file.
  10. Not certain of Microsofts intent. The backupdirectory typically resides on the Certificate Authority (CA) server. So it is expecting the format of directory|filename. As I mentioned, it works fine at the command line with the "|". It will not work without it. A batch file with the single line certutil -restorekey -f -p "" c:\|%username%.pfx returns the attached result. See cert.jpg
  11. That is the entire script at the moment. Once I get the windows screen up I will continue. On the other hand, can I call a windows batch file from within Autoit and when the resultant Windows screen pops up continue on with WinWaitActive ?
  12. 1. Results in: 402.203.0: 0x80070057 (WIN32: 87): ..CertCli Version Expected no more than 1 args, received 2 CertUtil: Too many arguments 2. Results in: 'DI07Z79.pfx' is not recognized as an internal or external command, operable program or batch file. 3. Results in: 402.203.0: 0x80070057 (WIN32: 87): ..CertCli Version Expected no more than 1 args, received 2 CertUtil: Too many arguments
  13. I wish I could. It's part of the required syntax of the certutil line. It is shown in the help files. It will not run at the DOS cmd prompt properly without it. It I leave the "|" out of the dos command, I get "file not found". From Microsoft: To restore the CA certificate and keys from a backup directory or a PKCS #12 (.pfx) file Syntax certutil-restorekey[-f] [-gmt] [-seconds] [-v] [-configCAMachineName\CAName] [-pPassword] BackupDirectory|PFXFile If I run "certutil -restorekey -f -p "" c:\|%username%.pfx" at the command line it brings up the dialog box from part of the certmgr.msc. I could take it from there by doing my thing with the windows boxes as I've done in the past with Autoit.
  14. It runs by fast but I think it is arguing about the file name.
  15. 'DA071129.pfx' is not recognized as operable program or batch file. So that's what it was saying so fast I could not read it. Heheh. The file name, DA071129.pfx is correct and located on the root of C:\ And DA071129 is the test user I am running.
  16. Great. I'd have never done this. Thanks. I can build from here. \ Thank you, Now back to my attempt at certutil -restorekey
  17. I'm attempting (unsuccessfully) to use the following DOS Command into Autoit. certutil -restorekey -f -p "" c:\|%username%.pfx Yes, the "|" symbol is required. Otherwise I think what I have done below with the Comspec line would have worked. Here's are two of the many I have tried. Run('certutil -restorekey -f -p "" c:\|' & @UserName & '.pfx') Run(@Comspec & ' /c certutil -restorekey -f -p "" c:\' & ' |' & @UserName & '.pfx') So I have a syntax error and this one flashes on the screen so fast I'm going blind determining if it can't find the file (which is the problem) or some other error (when I've messed up more poking it with a sharp stick). I appreicate your help.
  18. I'm trying to duplicate the following DOS command certutil -importPFX -p "" c:\%username%.pfx I can't figure out how to write that I want a specific file type (.pfx) for the logged on user, @UserName. I've tried a lot of things that don't work. For example: Run('certutil -importPFX -p c:\' & @UserName ".pfx") Run('certutil -importPFX -p c:\' & @UserName & ".pfx") Run('certutil -importPFX -p c:\' & @UserName & .pfx) I've chanted, ranted, and raved at the script but that hasn't helped either. A little direction if you please.
  19. ROFL, Obviously, I didn't know that command existed. I'll have to review them. Thank you!
  20. I'm trying to duplicate the dos command cipher /a /e /q /s:"C:\Documents and Settings\%username%\my documents" In AutoIt, I've tried many variations but find (so far) that the following line is the only one that does nor give syntax errors when checking the file. But of course, it does not work. Run("cipher.exe /a /e /q /s:c:\C:\Documents and Settings\" & @UserName & "my documents") Toss me a bone here
  21. That's it. Thank you very, very much!!
  22. I'm having a syntax problem with a line of code. I'm trying to duplicate the cmd line on an XP machine. The cmd line would read: cipher /x c:/%username% If the logged on user was "Bob" the result of the above would be a file on the root of c: as c:\bob.pfx Now, in autoit the command I expected it to work as this: Run("cipher.exe /x c:\@UserName") It runs but the result is a file on the root of c: called c:\@UserName.pfx I've tried chopping it up with varies "" and '' brackets etc. I just can not find a solution. Sigh. Can this be done? Thanks
×
×
  • Create New...