Sign in to follow this  
Followers 0
aslion

FileWriteLine ( ==> Missing separator character (") after keyword)

5 posts in this topic

Sorry bad english.Problem " in character. What can I do.

My regedit output

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\POWER\HOME]
"CDKEY" "xxxx-xxxx-xxxx-xxxx"

AU3 File

Opt("TrayIconHide", 1)
Dim $cdkey_file = "cdkey.reg"
Dim $backup_file = "cdkey-" & @YEAR & "_" & @MDAY & "_" & @MON & "_" & @HOUR & "_" & @MIN & ".bak"
FileMove ($cdkey_file, $backup_file)
$blocked = InputBox("CD-KEY", "Please insert CD-KEY")
Sleep(3000)
FileDelete("cdkey.reg")
FileWriteLine("cdkey.reg", "Windows Registry Editor Version 5.00")
FileWriteLine("cdkey.reg", "")
FileWriteLine("cdkey.reg", "[HKEY_LOCAL_MACHINE\SOFTWARE\POWER\HOME]")
FileWriteLine("cdkey.reg", "CDKEY"  "& $blocked"

ERROR

==> Missing separator character after keyword.: 
FileWriteLine("cdkey.reg", "CDKEY"  "& $blocked") 
FileWriteLine("cdkey.reg", "CDKEY^ ERROR

Share this post


Link to post
Share on other sites



Should be:

FileWriteLine("cdkey.reg", "CDKEY" & $blocked)

I did,but

CDKEYxxxx-xxxx-xxxx-xxxx

I want to be like

"CDKEY" "xxxx-xxxx-xxxx-xxxx"

Share this post


Link to post
Share on other sites

FileWriteLine( "cdkey.reg", chr(34) & "CDKEY" & chr(34) & " " & chr(34) & $blocked & chr(34) )

Share this post


Link to post
Share on other sites

FileWriteLine( "cdkey.reg", chr(34) & "CDKEY" & chr(34) & " " & chr(34) & $blocked & chr(34) )

Thank you.Problem was resolved.

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