Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st July 2012, 17:22   #1
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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 is offline   Reply With Quote
Old 1st July 2012, 22:44   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Try SetRegView 64 (not 32).

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 00:25   #3
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 04:46   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
!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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd July 2012, 10:33   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Quote:
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 15:10   #6
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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 is offline   Reply With Quote
Old 2nd July 2012, 17:05   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
You are not supposed to elevate at startup, use requestexecutionlevel user

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd July 2012, 20:29   #8
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
currentversion\run does not work in Win 7 32 bit os

I ahave tried all 4 elevations, none work
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 20:30   #9
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
I have tried all 4 elevations none work.
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 20:32   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Have you tried putting the executable in Program Files or %APPDATA%?

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 20:40   #11
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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.
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 21:07   #12
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
I have tested using:
code:
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 21:55   #13
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
..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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd July 2012, 21:59   #14
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 22:36   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 22:40   #16
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
What happens when you put in the following reg key?

"HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Jake2313 is offline   Reply With Quote
Old 2nd July 2012, 22:54   #17
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
That is the key I tried.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd July 2012, 23:51   #18
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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
Jake2313 is offline   Reply With Quote
Old 3rd July 2012, 01:48   #19
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
Quote:
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?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 3rd July 2012, 02:12   #20
Jake2313
Junior Member
 
Join Date: Jul 2012
Posts: 10
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
Jake2313 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump