Re: Software Install script



Torgeir,
Thank you for your timely response. When I ran the script locally on
the workstation, it was successful. When I copied the script to the SERVER
and entered the location in a test user account profile (logon script field)
on the SERVER, rebooted the workstation and logged in, the script did not
run. Are there any issues regarding rights/permssions, etc. I should be
aware of that are preventing the script from running on the workstation? Any
information you can provide will greatly appreciated.
--
Chuck Durley
Network Analyst
--
Chuck Durley
Network Analyst


"Torgeir Bakken (MVP)" wrote:

> Chuck Durley wrote:
>
> > To reply to your response:
> > 1. All users are in a domain
> > 2. The setup.exe will use the setup.exe -r -f1 (for a response file and
> > silent install)
> > 3. Yes I would like to check the registry to determine whether or not the
> > application was previously installed.
> >
> > Any help you can provide will be greatly appreciated.
> Hi,
>
> Ok, the users are in a domain, but are they in the local
> Administrators group on the computers? The user needs to have local
> admin rights to be able to install software in the logon script. If
> they are not local admins, you could do it in a computer startup script
> (with a GPO) that runs as part of the boot up process (before the user
> logs in). It runs under the system context and has admin rights.
>
> I assume you mean -s and not -r (at least for InstallShield
> installation, -r is for uninstallation).
>
>
> Something like this should work:
>
> '--------------------8<----------------------
>
> Set oShell = CreateObject("WScript.Shell")
>
> ' Check on a registry value that disappears if you uninstall the program
> sRegValue = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" _
> & "\Uninstall\QuickTime\DisplayName")
>
> If sRegValue = "" Then
> ' Registry value was empty, install the program
>
> MsgBox "About to install program something, this might take some Time." _
> & vbCrLf & vbCrLf _
> & "Press OK to start the installation...", _
> vbSystemModal+vbInformation, "Logon script"
>
> ' Added -SMS to order InstallShield to wait for the worker
> ' process to finish before exiting
> oShell.Run "\\server\share\mysw\setup.exe -SMS -s" _
> & " -f1\\server\share\mysw\setup.iss", 1, True
>
> MsgBox "Finished installing program something." _
> & vbCrLf & vbCrLf _
> & "Press OK to continue...", _
> vbSystemModal+vbInformation, "Logon script"
>
> End If
>
>
> Function RegRead(sRegValue)
> Set oShell = CreateObject("WScript.Shell")
> On Error Resume Next
> RegRead = oShell.RegRead(sRegValue)
> ' If the value does not exist, error is raised
> If Err Then
> RegRead = ""
> Err.clear
> End If
> ' If a value is present but uninitialized the RegRead method
> ' returns the input value in Win2k.
> If VarType(RegRead) < vbArray Then
> If RegRead = sRegValue Then
> RegRead = ""
> End If
> End If
> On Error Goto 0
> End Function
>
> '--------------------8<----------------------
>
>
> WSH 5.6 documentation (local help file) can be downloaded from here
> if you haven't got it already:
> http://msdn.microsoft.com/downloads/list/webdev.asp
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
>
.



Relevant Pages

  • Re: firewalls, xfce4 and apachetoolbox (was: Re: BigApache [..])
    ... >> gotten your FreeBSD workstation to connect to the network yet? ... > basics working before I rebuild the kernel to install the ... run a firewall like IPFW. ... and pass the rest of the script as input to this program. ...
    (freebsd-questions)
  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: [opensuse] Editting PATH variable
    ... SuSEconfig script ... ... not knowing what you options you used to install ... If your unfamiliar with Bash a good book is 'Learning the Bash Shell' by ... For Java use editing the PATH variable is NOT required... ...
    (SuSE)
  • Re: WTF would ANYONE buy a WIn 7 PC?
    ... Ten minutes later that account is empty, ... Hey I should not teach script kiddies here ... ... And most of this software had nothing to do with needing to install a keyboard hook, let alone attempt to hook into some DLL's that get used system wide. ...
    (sci.electronics.design)
  • Re: KB911280 update problem
    ... Microsoft is working on an amended patch which will address this issue. ... Microsoft advises anyone affected by this to not install the patch and to ... That script is broken by the patch. ... He said he could not write a bug report ...
    (microsoft.public.windowsupdate)