- NSIS Discussion
- currentversion\run does not work in Win 7 32 bit os
Archive: currentversion\run does not work in Win 7 32 bit os
Jake2313
1st July 2012 18:22 UTC
currentversion\run does not work in Win 7 32 bit os
I am desperate for help. :cry:
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
Afrow UK
1st July 2012 23:44 UTC
Try SetRegView 64 (not 32).
Stu
Jake2313
2nd July 2012 01:25 UTC
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
2nd July 2012 05:46 UTC
!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
2nd July 2012 11:33 UTC
Originally posted by Afrow UK
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
2nd July 2012 16:10 UTC
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
Anders
2nd July 2012 18:05 UTC
You are not supposed to elevate at startup, use requestexecutionlevel user
Jake2313
2nd July 2012 21:29 UTC
currentversion\run does not work in Win 7 32 bit os
I ahave tried all 4 elevations, none work
Jake2313
2nd July 2012 21:30 UTC
I have tried all 4 elevations none work.
Afrow UK
2nd July 2012 21:32 UTC
Have you tried putting the executable in Program Files or %APPDATA%?
Stu
Jake2313
2nd July 2012 21:40 UTC
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
2nd July 2012 22:07 UTC
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
2nd July 2012 22:55 UTC
..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
2nd July 2012 22:59 UTC
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
2nd July 2012 23:36 UTC
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
2nd July 2012 23:40 UTC
What happens when you put in the following reg key?
"HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Afrow UK
2nd July 2012 23:54 UTC
That is the key I tried.
Stu
Jake2313
3rd July 2012 00:51 UTC
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
3rd July 2012 02:48 UTC
Originally posted by 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.
What did you change to make it work?
Jake2313
3rd July 2012 03:12 UTC
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