Skip to content
⌘ NSIS Forum Archive

currentversion\run does not work in Win 7 32 bit os

20 posts

Jake2313#

currentversion\run does not work in Win 7 32 bit os

I am desperate for help. 😢
I am new to Groups and this forum, joined today. I looked up what I could on the problem below but could not find the answer.
If I put the program in the RunOnce key it works fine, but I need the desktop loaded to get access to the task bar at the bottom of the screen
The user is a member of the adminiistrator group
The HS NSIS Editor 2.0.3 is being run as an administrator.
The UAC on the system has NOT been dissabled.
The FADE.EXE program is nothing more than a fading graphic and message box.
The code below is what I am trying to get to work.
Any help would be GREATLY appreciated, my boss is growing impatient with me.

;Running a .exe file on Windows Start
!include "uac.nsh"
!include "registry.nsh"
!include "LogicLib.nsh"
!include "x64.nsh"
Name "START WINDOWS"
OutFile "STRWIN.exe"
#AutoCloseWindow true
RequestExecutionLevel admin
## The section SampleFromWeb works fine on 32 or 64 bit, I know it should go to
## wow643node but it works both ways on a 64 bit machine
Section SampleFromWEB
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" \
"Notepad" "$WinDir\Notepad.exe"
MessageBox MB_OK "The Notepad Running as Windows Start"
SectionEnd

## The SectionRun32 does not work, It writes the registry but the EXE does not load after ##Windows has finished loading
Section Run32
SetRegView 32
WriteRegStr "HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" \
"Fade" "E:\Commands32BitNSIS\Fade.exe"
sectionend
RequestExecutionLevel none


Thanks in advance for your help
Alan Alias Jake2313
Jake2313#
currentversion\run does not work in Win 7 32 bit os

Thank you for your response!!
Tried your solution, no luck.
I activated the real admin account and everything runs fine. Unfortunately the customer will not allow the user to be a true administrator.
I have tried all three levels for RequestExecutionLevel none help.
Please help,,again
Anders#
!include "uac.nsh" why?

Have you verified that the entry is there in Autoruns? You can log with Process Monitor even when no users are logged in, google and you will find...
Afrow UK#
Originally Posted by Afrow UK View Post
Try SetRegView 64 (not 32).

Stu
Sorry this would not have worked - I missed the bit in your topic title - SetRegView 64 does nothing on a 32-bit OS.

Try creating the registry value manually and see if that works. If not then I would suspect something is wrong with the application.

Stu
Jake2313#
currentversion\run does not work in Win 7 32 bit os

I agree it seems to be my EXE. Notepad and wordpad work fine.
Running as true Admin also works fine.
Here is the code for my Fade.exe file. It's a very simple test.

Name "IntelliScan 5 Setup Step 2 of 2"
OutFile "Fade.exe"
!include "logiclib.nsh"
!include "uac.nsh"
!include "registry.nsh"
!include "x64.nsh"
AutoCloseWindow true
ShowInstDetails show
RequestExecutionLevel highest
section
MessageBox MB_OK "Click OK for logo"
sectionend
RequestExecutionLevel none

So much for doing simple things quickly
Jake2313#
yes.
As you read erlier it works when you log in as a true administrator. By that I mean I enabled the administrator acount through the fontrol panel then logged in as administrator and everything works fine.
Afrow UK#
I have tested using:
Name "IntelliScan 5 Setup Step 2 of 2"
OutFile "Fade.exe"
AutoCloseWindow true
ShowInstDetails show
RequestExecutionLevel user
section
MessageBox MB_OK "Click OK for logo"
sectionend
Tested on Windows 7 x64 with UAC on its maximum level. This works fine for limited and administrator users. I put the executable in C:\Program Files\Test. Probably pointing out the obvious here but your script does have RequestExecutionLevel twice (highest and none).

Stu
Anders#
..and none=admin because of setup detection so use "user".

The only way to figure out the issue is to have Process Monitor logging events during log on...
Jake2313#
Hi Stu

Thanks for taking the time to test my little EXE on your system!!!
I have not had aproblem runnig on a 64 bit system, the problem shows up when I try to run it on a Win 7 32 bit Pc
Afrow UK#
Just tried on Windows 7 32-bit with the same result as the test on Windows 7 64-bit. Check your path is correct (run it from cmd).

Stu
Jake2313#
What happens when you put in the following reg key?

"HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Jake2313#
It WORKS!!!!
All of you have been very patient with me, thanks you so much. It seems when it comes to software I always make things to complicated.

I thank you and my boss thanks you
Anders#
Originally Posted by Jake2313 View Post
It WORKS!!!!
All of you have been very patient with me, thanks you so much. It seems when it comes to software I always make things to complicated.
What did you change to make it work?
Jake2313#
I cut it down to the code Stu had in his reply above. Like I said I usualy end up making things to hard for myself, like they say keep it simple _______

Thanks again for all your help
Jake