Jump to content

Installing with RunOnceEx from network share


Recommended Posts

Hello once again! I finally decided to move my Application folder to a Network Share (to save space on my CD) and I'd like a simple mecanism to check if the network is accessible and if not, a warning message to tell that the programs weren't installed.

so, first lets specify that I am launching my RunOnceEx command from GuiRunOnce in my winnt.sif:

[GuiRunOnce]
%windir%\Temp\Install\RunOnceEx.cmd

Here is the part I want to work out in RunOnceEx.cmd:

IF NOT EXIST \\My\Network\Share\check.txt (GOTO WARNING) ELSE GOTO INSTALL

:WARNING
How would I make a prompt box with a OK button?

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

REG ADD %KEY% /V TITLE /D "Stop Picking your Nose Please" /f

REG ADD %KEY%\001 /VE /D "Nero© Burning ROM 6.6" /f
REG ADD %KEY%\001 /V 1 /D "\\My\Network\Share\Applications\Nero\NERO.exe /silent /noreboot /no_ui" /f

rundll32.exe iernonce.dll,RunOnceExProcess

That's about it. You get the idea...

Edited by Incroyable HULK
Link to comment
Share on other sites


NirCMD does everything you could ever want. Ever.

This would give you a messagebox with the message "Network Share not Accessible" and the title "Error"

NirCMDc.exe InfoBox "Network Share not Accessible" "Error"

Also, this would give you a dialog box with "Yes" and "No" buttons, where yes would call your RunOnceEx.cmd again

NirCMDc.exe QBox "Network Share not Accessible.  Try again?" "Error" "RunOnceEx.cmd"

In the same vein, this would give the same message, but when it calls the .cmd file again it would run it without opening a command window

NirCMDc.exe QBoxCom "Network Share not Accessible.  Try again?" "Error" Exec Hide "RunOnceEx.cmd"

I wrote all of these off the top of my head, I may have typoed somewhere, but the idea is there. Refer to the documentation on the website.

Alternatively, if you don't want to use a seperate tool you can just use Windows Messenger. The window isn't as pretty, but still gets the message across

Msg "%UserName%" "Network Share not Accessible"

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...