Old 11th February 2008, 08:21   #1
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
install problem on win2003server

i made my setup.exe and i can correctly install it under windowsXP, but on win2003server i'm able to install my application just if i'm admin, if i log in on win2003server as normal user i can't install and neither uninstall the application.
When install my app as admin on win2003server all the user all able to run the app, but no one can't uninstall it.
If i'm a normal user i can just run the app.
The normal users have a not-restricted account, why can't they remove the app and install the app?
mattia83 is offline   Reply With Quote
Old 11th February 2008, 09:12   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
a normal user can NOT write to $programfiles or the HKLM part of the registry

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th February 2008, 13:23   #3
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
ok.
but if i'm admin and i install the app, all my users can run it, my app creates a folder in
C:\Documents and setting\username\myapp
when the admin uninstall the app there is away to delete all the myapp dirs in each user space?

in pseudo code:
for( i = 0; i<alltheuser; i++ )
{
remove C:\Documents and setting\alltheuser[i]\myapp
}

thx
------------------------------
edit:
i've the same problem when i remove the the register keys in HKCU, the admin keys have been removed the users keys are not.
Any hint?

Last edited by mattia83; 11th February 2008 at 13:53.
mattia83 is offline   Reply With Quote
Old 11th February 2008, 13:57   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
http://nsis.sourceforge.net/EnumUsersReg

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th February 2008, 14:18   #5
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
thx for the script, but i have still a problem, with key i have to read to know all the users?
mattia83 is offline   Reply With Quote
Old 12th February 2008, 08:17   #6
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
i have some questions about this script
http://nsis.sourceforge.net/EnumUsersReg

this is the section that call the function
code:

Section
${EnumUsersReg} CallbackFunction temp.key
SectionEnd


i call CallbackFunction with a parameter temp.key
First question: who's temp.key? I have not defined any temp.key before

That's the function:
code:

Function CallbackFunction

Pop $0

ReadRegStr $0 HKU "$0\Software\Microsoft\Internet Explorer" "Download Directory"
DetailPrint $0

FunctionEnd


Second question: CallbackFunction has not parameter in input, why do i call it with temp.key?
thx
mattia83 is offline   Reply With Quote
Old 12th February 2008, 20:41   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
temp.key is the registry key into which each user's hive will be loaded.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 13th February 2008, 13:43   #8
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
my problem is that i have to call:
${EnumUsersReg} CallbackFunction temp.key
into an unistall section, but i get an error in this way:
code:
Function un.CallbackFunction
Pop $0
ReadRegStr $0 HKU "$0\Software\Microsoft\Internet Explorer" "Download Directory"
DetailPrint $0
FunctionEnd


code:

Section Uninstall
...
${EnumUsersReg} un.CallbackFunction temp.key
...
SectionEnd


any hint?
mattia83 is offline   Reply With Quote
Old 14th February 2008, 10:11   #9
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Prefix every function's name with "un." in that script. The errors should guide you to missed spots.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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