Incroyable HULK Posted June 30, 2005 Share Posted June 30, 2005 (edited) 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.cmdHere is the part I want to work out in RunOnceEx.cmd:IF NOT EXIST \\My\Network\Share\check.txt (GOTO WARNING) ELSE GOTO INSTALL:WARNINGHow would I make a prompt box with a OK button?:INSTALLSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Stop Picking your Nose Please" /fREG ADD %KEY%\001 /VE /D "Nero© Burning ROM 6.6" /fREG ADD %KEY%\001 /V 1 /D "\\My\Network\Share\Applications\Nero\NERO.exe /silent /noreboot /no_ui" /frundll32.exe iernonce.dll,RunOnceExProcessThat's about it. You get the idea... Edited June 30, 2005 by Incroyable HULK Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 30, 2005 Share Posted June 30, 2005 If you are in the domain, most simple method is to check for LogonServer variable. If defined LogonServer goto:continue Link to comment Share on other sites More sharing options...
Achdine Posted June 30, 2005 Share Posted June 30, 2005 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 More sharing options...
Martin Zugec Posted June 30, 2005 Share Posted June 30, 2005 Sometimes I am using this simple method (when I am in hurry):echo MsgBox "Network not available",0,"Error" > temp.vbswscript temp.vbsdel temp.vbs Link to comment Share on other sites More sharing options...
Sonic Posted June 30, 2005 Share Posted June 30, 2005 or use "pause" in command prompt ... it's not very cool but it works ... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now