Jump to content
Sign in to follow this  
Resul

Chr (34) using

Recommended Posts

Resul

Hello,

this code have a problem.

RunWait(@ProgramFilesDir & "\Avira\Antivir Desktop\setup.exe /REMSILENT / PASSWORD =" & chr(34) & "12340000" & chr(34), "", @SW_HIDE)

Thank you for helping

Share this post


Link to post
Share on other sites
Chimaera

Maybe this?

RunWait(@ProgramFilesDir & "\Avira\Antivir Desktop\setup.exe /REMSILENT / PASSWORD =" & '"' & "12340000" & '"'), "", @SW_HIDE)

Chimaera

Or maybe this

$pass = /PASSWORD ='"' & "12340000" & '"'
RunWait(@ProgramFilesDir & "\Avira\Antivir Desktop\setup.exe" & "/REMSILENT" & $pass), "", @SW_HIDE)

Or maybe this lol

$pass = '"' & "12340000" & '"'
RunWait(@ProgramFilesDir & "\Avira\Antivir Desktop\setup.exe" & "/REMSILENT" & "/PASSWORD =" & $pass), "", @SW_HIDE)
Edited by Chimaera

Share this post


Link to post
Share on other sites
Resul

Unfortunately not = (

The error image is attached.

post-66103-0-57053000-1310741023_thumb.j

Share this post


Link to post
Share on other sites
Resul

Other Error screenshot

post-66103-0-36581700-1310741190_thumb.j

Share this post


Link to post
Share on other sites
Chimaera

$pass = '"' & "12340000" & '"'
ConsoleWrite( $pass)
$test = RunWait(@ProgramFilesDir & "\Avira\Antivir Desktop\setup.exe" & "/REMSILENT" & "/PASSWORD =" & $pass, "", @SW_HIDE)
ConsoleWrite( $test)

run that and see what messages you get in the console window

Password is correct like this as well

$pass = '"12340000"'
Edited by Chimaera

Share this post


Link to post
Share on other sites
Chimaera

Try this:

$sPassword = 123456
RunWait(@ProgramFilesDir & '\Avira\Antivir Desktop\setup.exe /REMSILENT /PASSWORD ="' & $sPassword & '"', "", @SW_HIDE)

As i understand it m8 he wants the " as part of the password

ie. pass = "123456"

Share this post


Link to post
Share on other sites
martin

i assumed they were part of the pass from this

PASSWORD =" & chr(34) & "12340000" & chr(34

being as chr(34) = "

But then im known to be wrong lol

That doesn't make sense to me, but the usual way to include a quotation mark as part of the text is to write it twice so you would need

PASSWORD = """12340000"""

that is 3 sets of chr(34) at the start and another 3 at the end.

But it could be that quotation marks as part of the password simply won't work.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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  

×