Jump to content

woody619

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by woody619

  1. Thanks for the help guys. Sorry new to scripting, so didn't think about using ShellExecute which works great. Can't use RunAs it's part of a tool to be use by a group, so want to avoid putting credentials in script. I'm using powershell, because it allows me to remotely reboot the machine. It prompts for the name of the machine in Autoit's GUI and I'm hoping it will pass it somehow over to powershell (hoping send command) when it's executed and then does it. Is there a way I can get the variable information passed to powershell when powershell executes and prompts for input? The gui i created in Autoit has a field for the computername. It doesn't seem that the Administrator Powershell Window can take the characters when sent via Send
  2. Hi, I'm having trouble with the last window ("Administrator: Windows PowerShell")receiving the characters via "Send" I'm thinking it must be something with the Powershell being run as admin window. What am I doing wrong? Please let me know if there's an easier way than how I'm doing it. Thanks Run ("cmd.exe") WinWaitActive ( "C:\Windows\system32\cmd.exe") Send ( "powershell" & "{ENTER}" ) Send ( "Start-Process PowerShell –Verb RunAs" & "{ENTER}" ) WinWaitActive ( "Administrator: Windows PowerShell") Send ( "powershell.exe -noexit C:\ps1\script1.ps1" )
  3. That works! Looks like I tried that, but must've messed up something somewhere else that day. Thanks for your help ;~ Also doens't work FileDelete ("\\" & $computerName & "\c$\Windows\System32\spool\PRINTERS\")
  4. Hi, I'm creating a gui that will clear the contents of a specific folder remotely. I'm having trouble I believe because filedelete requires quotes around the path, but the way I've coded it (string?) also requires the quotes. How can I make this work? I'm just starting to script, so sorry if I'm not saying it correctly ;~ This works FileDelete ("\\is1127000\c$\Windows\System32\spool\PRINTERS\") ;~ Doens't work FileDelete (""\\" & $computerName & "\c$\Windows\System32\spool\PRINTERS\"") ;~ Also doens't work FileDelete ("\\" & $computerName & "\c$\Windows\System32\spool\PRINTERS\") ;~ Also doesn't work $Read= GUICtrlRead ($Input1) $start="(" $close=") $computerName = GUICtrlRead($Input1) FileDelete $start & "\\" & $computerName & "\c$\Windows\System32\spool\PRINTERS\" & $close
×
×
  • Create New...