Link to home
Create AccountLog in
Avatar of Looking_4_Answers
Looking_4_Answers

asked on

Help with Inno Setup registry entry

I want my program to start up when windows starts up

I added this line to my setup (inno) and it works, it adds the line to the registry, but i get a Acess Denied error. Not sure what is causing it

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Alerts_client.exe"; ValueData: "{app}\Alerts_client.exe"

If i comment this registry entry out, the error message goes away.....and of course, i dont get my registry entry.

what gives? any inno setup users out there, know if my registry entry is correct?

thanks
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Access denied during the installation, or subsequent use?

ValueData better be [INSTALLDIR\alerts_client.exe , or even better [#filename] where filename is the value from the column "File" in the table "File" describing this file. (I'm not sure what it looks like in Innosetup).
For InnoSetup, {app} is equivalent to [INSTALLDIR].  

What is your PrivilegesRequired set to in the [Setup] section?  

Based on your description, the Access Denied seems to be coming after install when the program is run.  If that's the case, what is the application doing at that point?  
Avatar of Looking_4_Answers
Looking_4_Answers

ASKER

@mirtheil

I used the basic wizard to create my script. The only thing i added was the registry section

which you see in my question

I dont see anything in the setup that has the words privedge in it or related to it

I am still baffles as to why i got the message, yet the key and data was placed in the registry and when i turn off my computer and restart it, my app starts up on startup

yet, when i do the initial setup, the installer throws that error "Access Denied"......and i dont get it, if i comment out the registry section, so i kjnow it has to do with that, or im missing some other line in my script

thanks
ASKER CERTIFIED SOLUTION
Avatar of Mirtheil
Mirtheil
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
im not sure i follow you....i run this from windows

Alerts_Client_Setup.exe  /LOG="install.log"  ????


I get a file not found
What version of InnoSetup are you using?  
From the version I'm using (5.4.0):
/LOG
Causes Setup to create a log file in the user's TEMP directory detailing file installation and [Run] actions taken during the installation process. This can be a helpful debugging aid. For example, if you suspect a file isn't being replaced when you believe it should be (or vice versa), the log file will tell you if the file was really skipped, and why.

The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)

The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.

/LOG="filename"
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.


You might need to specify a full path for the filename (c:\install.log).  THen once you're install is done, you should find the install.log that was created and post it.
I figured it out by running it from the MS DOS window. I did get a log file, but the log file never shows a registry entry.

I am no lobger receiving the error message.

I cleaned the registry key, i uninistalled the app, and did a clean run of the setup a number of times, and i can't seem to get a error anymore.  Interesting. I never did change anything with the script.  I did reboot earlier though.

Ummmm, i did learn something new though.....that /log thingy is nice to know...thanks!
However, nothing about the writing of a registry value shows up in the log. Even though i don't get the error anymore.

Thanks
I figured it out by running it from the MS DOS window. I did get a log file, but the log file never shows a registry entry.

I am no lobger receiving the error message.

I cleaned the registry key, i uninistalled the app, and did a clean run of the setup a number of times, and i can't seem to get a error anymore.  Interesting. I never did change anything with the script.  I did reboot earlier though.

Ummmm, i did learn something new though.....that /log thingy is nice to know...thanks!
However, nothing about the writing of a registry value shows up in the log. Even though i don't get the error anymore.

Thanks