Archive: Looking for some guidance


Looking for some guidance
My previous experience with NSIS involved moinor maintainence on someones existing installer. Now that I'm starting one from scratch, I could use a few pointers.

For my environment I went with the Eclipse NSIS plugin, its working nicely. HM NIS Edit was throwing errors and crashing on the example scripts, sad because I liked it a lot before.

Here are some things I'm trying to do...
-Start one or two external installers that are on CDs
From reading the user manual it looks like I should use ExecWait.
Edit: This is assuming I know which drive is the cd drive. Should I just prompt the user to simplify things?

-Install one ActiveX control
Found this on the wiki http://nsis.sourceforge.net/ActiveX_...onent_Register

-Change the resolution to 1024x768
Found this on the wiki too http://nsis.sourceforge.net/ChangeRes_plug-in

-Disable the screen saver

-Disable power management

-Set the IP address
Is there a plugin for this?

-Make sure the date/time are correct
I found THIS any suggestions on how to get the correct time regardless of current system time?

-Enable automatic login
The comps I am making this for are in "welcome screen mode" for lack for better term that I know. They should have only one acount but that account will have a password. There is probably a registry key for this but I'm not sure where to start looking.


Thanks for any advice you can spare :)


This is assuming I know which drive is the cd drive. Should I just prompt the user to simplify things?
If your installer resides on the same media you could use $EXEDIR, otherwise there are a couple of plugins at wiki dealing with CD drives, e.g.
http://nsis.sourceforge.net/EnumCDs_plug-in
http://nsis.sourceforge.net/CDRom_plug-in

-Disable the screen saver

-Disable power management
These info are stored to the registry.

-Set the IP address
Is there a plugin for this?
What do you mean set?
http://nsis.sourceforge.net/IP_plug-in
http://nsis.sourceforge.net/Internet_plug-in


-Enable automatic login
ain't that simple to by bass user's password.

thank you for the help :D

managed to dig up a few more answers, in case anyone else has the same questions

it looks like the screensaver can be disabled in the registry here http://articles.techrepublic.com.com...1-5572452.html

as for setting the IP address and other network information quickly the netsh command thats build in to windows is the way to do, you can edit the registry but it gets messy
for example: netsh interface ip set address "Local Area Connection 2" static 192.168.1.10 255.255.255.0 192.168.1.1 1

for the automatic logon function Im not trying to "bypass" the users password just make it so they never have to take the time to log in again. While Im still not sure of a way that is attractive for end users to accomplish this it can be done relatively easily through the registry.
http://support.microsoft.com/kb/310584


as for setting the IP address and other network information quickly the netsh command thats build in to windows is the way to do, you can edit the registry but it gets messy
for example: netsh interface ip set address "Local Area Connection 2" static 192.168.1.10 255.255.255.0 192.168.1.1 1
Cute! I'm happy because most likely I'd never use any of your installers on my machine :D

for the automatic logon function Im not trying to "bypass" the users password just make it so they never have to take the time to log in again. While Im still not sure of a way that is attractive for end users to accomplish this it can be done relatively easily through the registry.
http://support.microsoft.com/kb/310584
Gee! What's become my intelligence! Now I got your point! Your going to pop up a custom page asking users something like "please enter your windows logon user name and password in the fields bellow to enable automatically logon" :D

the users would be doing the same thing manually otherwise :p

Edit: er, their systems would be imaged to behave like this

Edit2(hah): sorry I never explained that this installer is not really for users to just install on their home computers for example but rather for industrial touch panels that are owned by a company in a very specific environment where users should never have to log in or worry about a screensaver because its their job to hit the stop button on the screen to keep someone from getting their arm cut off but a piece of machinery... just to give you a reasoning for the somewhat odd requirements I'm working with :p


and yes it looks like Im going to have to become well-versed in custom pages to make all this happen :cry:


auto logon
The 'automatic logon' key is in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. You should set DefaultDomainName, DefaultUserName, and AutoAdminLogon. (The last one gets set to 1). If these values aren't correct when the system boots, it will prompt for correct values. (If your browser wraps the line containing the registry key, note that the key after Microsoft is 'Windows NT' with a space).

Don


I've posted some sample code the other day dealing with registry and demonstrating the creation of custom page that you may download and examine as a starting point hopefully helpful for you.
Get it in the following forum thread,
http://forums.winamp.com/showthread....hreadid=262263

Anyway if you intend to install windows on a workstation through this procedure, it might be better idea to use unattended installation.
If I remember correctly, one is able to manage all these within an customized unattended installation, (disable screensaver, power management, desktop settings, enable auto logon, allow users only to set up their user name and password, set up network settings, almost everything I guess).
Moreover you may install drivers and other required software within unattended.
This what I can't get is the meaning of adding user name and password when autologon is enabled.


thanks I'll put this to use

another question, I have been using the components page to ask which version of the app should be deployed, should I use a custom page with radial buttons instead because only one should ever be installed


another question, I have been using the components page to ask which version of the app should be deployed, should I use a custom page with radial buttons instead because only one should ever be installed
It's up to your preference, with nsis you're always can do it the way you like. :)
BTW the custom page with radio buttons already discussed a few threads below.

http://forums.winamp.com/showthread....hreadid=263822

Will this plugin...
http://nsis.sourceforge.net/ActiveX_...onent_Register

...allow me to register OCX files too?


I couldn't say for the plugin, I haven't test it, I'd say NSIS allows you see the documentation,
http://nsis.sourceforge.net/Docs/AppendixB.html#B


I think Im doing something wrong with this function for a custom page, it always behaves like the first button was pressed

Function InstallInTouch
!insertmacro MUI_INSTALLOPTIONS_READ $0 "$PLUGINSDIR\InstallInTouch.ini" "Settings" "State"
StrCmp $0 0 validate ; Next button?
StrCmp $0 1 verify ; verify button?
StrCmp $0 2 install ; install button?
StrCmp $0 3 skip ; skip button?

verify:
MessageBox MB_OK "Verify Button Pressed"
goto done

install:
MessageBox MB_OK "Install Button Pressed"
goto done

skip:
MessageBox MB_OK "Skip Button Pressed"
goto done

validate:
MessageBox MB_OK "Next Button Pressed"

done:
FunctionEnd


InstallInTouch.ini follows

; Auto-generated by EclipseNSIS InstallOptions Script Wizard
; Jan 17, 2007 11:46:36 AM
[Settings]
NumFields=4

[Field 1]
Type=Button
Flags=NOTIFY
Left=63
Top=22
Right=113
Bottom=37
Text=Verify

[Field 2]
Type=Button
Flags=NOTIFY
Left=63
Top=65
Right=113
Bottom=81
Text=Install

[Field 3]
Type=Button
Flags=NOTIFY
Left=63
Top=109
Right=113
Bottom=125
Text=Skip


I just have a messagebox for each button to make sure I can get basic stuff right before adding real behavior.


I think it's just not getting caught by any of the StrCmp statements, what gives?


When using MUI_INSTALLOPTIONS_READ, you shouldn't pass $PLUGINSDIR\your.ini. The macro adds $PLUGINSDIR on its own.


thank you :D