Jump to content

Reboot then RunOnceEX


Recommended Posts

Hello,

I am trying to install GFI LanGuard Network Security Scanner via WPI. I had to repackage the installer because I couldn't get it to go silently and didn't want to use autoit. It installs fine, except that it needs a reboot to create a service. I have a .cmd file that accomplishes this via RunOnceEx. See below.

Followup.cmd

cmdow @ /HID
@echo off

IF EXIST D:\autorun.inf set CDROM=D:
IF EXIST E:\autorun.inf set CDROM=E:
IF EXIST F:\autorun.inf set CDROM=F:
IF EXIST G:\autorun.inf set CDROM=G:
IF EXIST H:\autorun.inf set CDROM=H:
IF EXIST I:\autorun.inf set CDROM=I:
IF EXIST J:\autorun.inf set CDROM=J:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\001 /V 1 /D "%CDROM%\postinstall\Security\GFI\postinstall.cmd" /f

shutdown -r -f -t 0

Postinstall.cmd

cmdow @ /HID
@echo off

net user LNSS_MONITOR_USR password
sc config "GFI LANguard N.S.S. 7.0 Attendant Service" password= password

If I test this install all by itself on a fresh Windows install, it works just fine after reboot. But I am trying to have this happen through WPI and I have it set as a dependancy of the GFI application and have the install order set to 9999 so it the last thing in RunOnceEx. Postinstall.cmd gets added to RunOnceEX but it gets executed before the reboot. I thought that setting the shutdown command to happen immediately would prevent that, but it just doesn't seem to work the way I want it to. Can anyone give me any tips on how I can get this working.

Thanks.

Edited by imthemp3king
Link to comment
Share on other sites

  • 2 weeks later...

imthemp3king,

Not sure if you were in on the WPI4.4rc1 testing, but made some enhancements to my WPI to include RebootFlag and Reboot capability. This version is definately not the release version of any kind as mritter and Kel have been working on a very nice solution for RC2.

The RebootFlag checkbox will flag for reboot then after all the WPI Applications get installed, it will reboot your system.

The Reboot checkbox will reboot your system after executing the last command of the current application, then pick up where it left off installing the rest of the apps when your system comes back up.

These 2 functions are found as checkboxes under the Config Page of WPI.

Be sure to make backup copies of your files as the code within my version will modify your config.js...it is not backwards compatible (at least I don't think).

The download can be found at this post:

Post of Potential Solution

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...