DiscoRhino Posted February 22, 2006 Posted February 22, 2006 I've been tasked with trying to create a way of auto-installing and configuring an application. I want it so that after it has installed it enters a registary entry and I've used this: RegWrite("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUNONCE", "CiscoVPN", "REG_SZ", "Installed") The idea being that if someone tries to run it again, it ignores the installation function and skips straight to the configuration function that I have created. I've put in this to read the registry key: Func Reg() $var = RegRead("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUNONCE", "CiscoVPN", "REG_SZ") if $var = "Installed" Then config() endif if $var = "" Then install() endif EndFunc It is with this part of the program that I get the error: Error: Incorrect number of perameters in function call. Can anyone see what I've done wrong? Apologies if more info is needed, but this is the first time I've used AutoIt and the first time of posting. Thanks
Developers Jos Posted February 22, 2006 Developers Posted February 22, 2006 (edited) RegRead has only 2 parameters:$var = RegRead("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUNONCE", "CiscoVPN") Edited February 22, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now