Sign in to follow this  
Followers 0
DiscoRhino

Incorrect number of perameters in function call.

2 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

RegRead has only 2 parameters:

$var = RegRead("HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUNONCE", "CiscoVPN")

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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