Sign in to follow this  
Followers 0
BDizzel1982

Need help with converting a simple batch file

5 posts in this topic

Hey everyone I'm new to autoit and was look for a little assistance. I'm trying to convert a simple batch file that runs the following command into an autoit script but keep getting syntax errors, any help converting this would be greatly appreciated.

 

@ECHO OFF
 
 
echo ====================================
echo Removing Boot Guard
echo ====================================
 
 
C:Program Files (x86)PGP CorporationPGP Desktoppgpwde.exe" --remove-bypass --admin-passphrase "Passw0rd!"
 
 
 

Share this post


Link to post
Share on other sites



Look at Run or ShellExecute in the help file. Try it out, and post what you have if you continue to see issues.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Hey JLogan3o13 I tried the Run command and this is what I get

Run('C:\Windows\System32\cmd.exe')
Send("c:program files (x86)pgp corporationpgp desktoppgwde.exe --remove-bypass --admin-passphrase "Passw0rd!")
 
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "V:test 2.au3"
+>10:55:23 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.10.2)  from:C:Program Files (x86)AutoIt3
"V:test 2.au3"(2,104) : error: syntax error
Send("c:program files (x86)pgp corporationpgp desktoppgwde.exe --remove-bypass --admin-passphrase "Passw0rd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
V:test 2.au3 - 1 error(s), 0 warning(s)
!>10:55:23 AU3Check ended. Press F4 to jump to next error.rc:2
+>10:55:23 AutoIt3Wrapper Finished..
>Exit code: 2    Time: 0.871
 
 
I'm not sure how to format the "Passw0rd!" which I need the command to enter

Share this post


Link to post
Share on other sites

How about something like this?

ShellExecute(@ProgramFilesDir & '\PGP Corporation\PGP Desktop\pgpwde.exe', '--remove-bypass --admin-passphrase "Passw0rd!"')

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thank you that worked perfectly

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  
Followers 0