qwerty1 Posted November 11, 2005 Share Posted November 11, 2005 I have been doing an unattended and after i do the install when i look in C:\ the install folder is still there even though i have this in the "start.cmd"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installDo i need to add something else. Link to comment Share on other sites More sharing options...
cumminbk Posted November 11, 2005 Share Posted November 11, 2005 add quotes and see what happendsECHO.ECHO Deleting Temp Installation Files...RD /S /Q "%systemdrive%\Drivers"RD /S /Q "%systemdrive%\install" Link to comment Share on other sites More sharing options...
Nilfred Posted November 11, 2005 Share Posted November 11, 2005 Try Silent way:rundll32.exe advpack.dll,DelNodeRunDLL32 %systemdrive%\Driversrundll32.exe advpack.dll,DelNodeRunDLL32 %systemdrive%\installAlso work in RunOnceEx Link to comment Share on other sites More sharing options...
qwerty1 Posted November 11, 2005 Author Share Posted November 11, 2005 cumminbk, i tried using the quotes but the folders are still there after install. I caught a glimpse of a warning box as it flashed on screen but it went by to fast for me to read it. Nilfred, were do i put these two lines, do they go in the start.cmd file. If so do i enter them exactly as you have written them. Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 11, 2005 Share Posted November 11, 2005 Here is a link to a hole thread on deleting things from the UA installThe Thread Link to comment Share on other sites More sharing options...
BoardBabe Posted November 12, 2005 Share Posted November 12, 2005 (edited) Here are parts of my cleanup relevant to what your asking. This is from my start.cmd that runs WPI and cleans up after install (basicly controls the whole UA process before and after WPI).@echo offSetLocal enableextensionsCLS: Deleting TEMP files.for /d %%g in ("%temp%\*") do rd /s /q "%%g"for %%g in ("%temp%\*") do del /q "%%g"for /d %%g in ("%windir%\Downloaded Installations\*") do rd /s /q "%%g"for %%g in ("%windir%\Downloaded Installations\*") do del /q "%%g"del /q "%Windir%\system32\$winnt$.inf"rd /s /q "%SystemDrive%\Install"rd /s /q "%SystemDrive%\Drivere": Reboot.shutdown.exe -r -f -t 60 -c "Vennligst vent...": Delete the current running file (start.cmd).del /q "%~f0"EndLocalexit:eofworks every time, clean and simple (I make sure that Start.cmd is copied to %SystemDrive%\ and not the %SystemDrive%\Install dir, therefore I can first remove ..:\install etc. and then reboot for lastly in the cmd to delete itself (start.cmd).) Edited November 12, 2005 by BoardBabe Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 12, 2005 Share Posted November 12, 2005 Here is a VBS script that start a cmd session and deletes the VBS script before the cmd session is finished. This is just to show the difference between how a VBS script can delete it self with out errors.Save As DeleteSelf.vbsDim Act,FsoSet Act = CreateObject("Wscript.shell")Set Fso = CreateObject("Scripting.FileSystemObject")Act.Run("%comspec% /c echo off && color f3 && mode 55,5 && title Test Delete && Echo." &_"&& Echo Test Delete The VBS Is Gone && Echo %UserName% && echo %Date% && ping -n 5 127.0.0.1>nul")Fso.DeleteFile("DeleteSelf.vbs") Link to comment Share on other sites More sharing options...
cumminbk Posted November 12, 2005 Share Posted November 12, 2005 (edited) @qwerty1 if you want to see what error message you are getting replace Exit at the end of your batch file with Pause. This will force you to hit enter before the file will continune so you will be able to read your error message and figure out what exatly the problem is. good luck Edited November 12, 2005 by cumminbk Link to comment Share on other sites More sharing options...
qwerty1 Posted November 12, 2005 Author Share Posted November 12, 2005 (edited) Thanks for the info all. gunsmokingman with this being my first go at an unattended install, im not understanding the things your saying and pointing me at. I need to give that link you first pointed me at a thorough reading. Now the second reply you made regarding "vbs" as belowDim Act,FsoSet Act = CreateObject("Wscript.shell")Set Fso = CreateObject("Scripting.FileSystemObject")Act.Run("%comspec% /c echo off && color f3 && mode 55,5 && title Test Delete && Echo." &_"&& Echo Test Delete The VBS Is Gone && Echo %UserName% && echo %Date% && ping -n 5 127.0.0.1>nul")Fso.DeleteFile("DeleteSelf.vbs")Were would i put this file and how would i adapt it for my purpose and were would it be called from.BoardBabe, here is my start.cmd so you can see what ive done. I also moved my start.cmd out of the install folder as per your instruction.CLS@echo offTITLE Windows XP SP2 - Semi-Unattended InstallationECHO.ECHO Over the next few minutes you will see automated installations ECHO of various software applications, windows updates, and registryECHO tweaks being implemented. The computer will restart automaticallyECHO once the whole process has finished!ECHO.ECHO Starting installation of ApplicationsECHO.ECHO Installing Kerio Personal Firewallstart /wait %systemdrive%\install\kerio\kerio-kpf-4.2.2-911-win.exe /s /v"/qn REBOOT=1ECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installEXITIve also tried using the following, using C:\ instead of %systemdrive% but still the folder dont get deleted.ECHO.ECHO Deleting Temp Installation Files...rd /s /q C:\Driversrd /s /q C:\installEXITI tried adding your clean up as followsCLS@echo offTITLE Windows XP SP2 - Semi-Unattended InstallationECHO.ECHO Over the next few minutes you will see automated installations ECHO of various software applications, windows updates, and registryECHO tweaks being implemented. The computer will restart automaticallyECHO once the whole process has finished!ECHO.ECHO Starting installation of ApplicationsECHO.ECHO Installing Kerio Personal Firewallstart /wait %systemdrive%\install\kerio\kerio-kpf-4.2.2-911-win.exe /s /v"/qn REBOOT=1ECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"@echo offSetLocal enableextensionsCLS: Deleting TEMP files.for /d %%g in ("%temp%\*") do rd /s /q "%%g"for %%g in ("%temp%\*") do del /q "%%g"for /d %%g in ("%windir%\Downloaded Installations\*") do rd /s /q "%%g"for %%g in ("%windir%\Downloaded Installations\*") do del /q "%%g"del /q "%Windir%\system32\$winnt$.inf"rd /s /q "%SystemDrive%\install"rd /s /q "%SystemDrive%\Drivers": Reboot.shutdown.exe -r -f -t 60 -c "Vennligst vent...": Delete the current running file (start.cmd).del /q "%~f0"EndLocalexitBut the folders still remain. I also took outECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"But it made no diference. by the way what is WPI, is it an install assistant.cumminbk, i tried using pause but no errors are showing. Ive tried that many things that its hard to remember which files i altered when i got the error box i mentioned.Heres whats happening with my install, at the end if it when i get the first logon screen and i login it gets as far as applying your personal settings then the pc reboots automatically, and if im correct there has already been one reboot immediately prior to this. The first reboot happens after the install of the app below and i think this reboot has something to do with the problem im having. Here,s my thoughts on itI think things seem to go wrong after the install of kerio although it installs ok. Even though ive added switches for a silent instal with no reboot. It looks like the no reboot is being ignored and i think its this reboot causing the problem. Are the lines ive put in my install of kerio correct to surpress a reboot. Edited November 12, 2005 by qwerty1 Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 12, 2005 Share Posted November 12, 2005 Try this it a self extracting SFX file that will clean up some short cuts and remove the Install and driver folder.Silent Ua Clean UpPlace it in the same spot to where you install the app from in your UA CD.Then add a entry to your RunOnce some thing like thisREG ADD %KEY%\170 /VE /D "Preparing Final Clean up ..." /fREG ADD %KEY%\170 /V 1 /D "%CDROM%Apps\SilentUaC.exe" /fThis is what the VBS script looks like in the SFX file.Red Do Not change unless you know what you are doingSome directoy locationsAction that the script performsFiles or folders that get deletedOn Error Resume NextDim Act, AP, Fso, UP, SD, SP, Wd, GarbageSet Act = CreateObject("WScript.Shell")Set Fso = CreateObject("Scripting.FileSystemObject")AP = Act.ExpandEnvironmentStrings("%AllUsersProfile%")UP = Act.ExpandEnvironmentStrings("%UserProfile%")SD = Act.ExpandEnvironmentStrings("%SystemDrive%") SP = Act.ExpandEnvironmentStrings("%SystemDrive%\Program Files")WD = Act.ExpandEnvironmentStrings("%Windir%")Fso.DeleteFolder(SD & "\Install")Fso.DeleteFolder(SD & "\Drivers")Fso.DeleteFile(AP & "\Desktop\Java Web Start.lnk")Fso.DeleteFile(AP & "\Desktop\Nero StartSmart.lnk")Fso.DeleteFile(AP & "\Desktop\Mozilla.lnk")Fso.DeleteFile(AP & "\Start Menu\Set Program Access and Defaults.lnk")Fso.DeleteFile(AP & "\Start Menu\Windows Catalog.lnk")Fso.DeleteFile(Wd & "\System32\$winnt$.inf")Fso.DeleteFile(SD & "\GmanSilentCUP.VBS")This was just a example of differences between VBS and CMD, it was to show that you can delete the VBS file while a Cmd that it start is still runningDim Act,FsoSet Act = CreateObject("Wscript.shell")Set Fso = CreateObject("Scripting.FileSystemObject")Act.Run("%comspec% /c echo off && color f3 && mode 55,5 && title Test Delete && Echo." &_"&& Echo Test Delete The VBS Is Gone && Echo %UserName% && echo %Date% && ping -n 5 127.0.0.1>nul")Fso.DeleteFile("DeleteSelf.vbs") Link to comment Share on other sites More sharing options...
qwerty1 Posted November 13, 2005 Author Share Posted November 13, 2005 gunsmokingman, thanks for your time and effort. I downloaded the SFX but i havnt got a "RunOnce" other than a entry in the winnt.sif file "GuiRunOnce". I tried putting the reg lines you suggested in there but i couldnt load from the iso got an error box saying line 47 wrong. I tried other variations but the files still remained after install. All through this testing i was becoming more and more certain Kerio was the cause of the problem, which has turned out to be the case. This was how i originally had the line written in start.cmd for installing KerioECHO.ECHO Installing Kerio Personal Firewallstart /wait %systemdrive%\install\kerio\kerio-kpf-4.2.2-911-win.exe /s /v"/qn REBOOT=1Kerio would install but ignored the no reboot and this seemed to end the start.cmd before the clean up could be run. I swopped the line and also the version of Kerio to install toECHO.ECHO Installing Kerio Personal Firewallstart /wait %systemdrive%\install\kerio\kerio-kpf-4.2.0-785-win.exe / S /V\"/qn REBOOT=Supress\"I know get a dialogue box containing the following during the Kerio installcommand line perameters/L language ID/S hide initiallization dialog. For silent mode use /S/v/qn/V parameters to msiexec.exe/ua <ur toinstmsia.exe>/ua <url to msi package>At the bottom of this box is a single confirmation box containing OKAfter pressing OK things carry on and after reboot Kerio is not installed but the good news is that after putting this original entry back in my start.cmd fileECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installThese folders along with the start.cmd file are deleted. So the problem definately centres round the Kerio install. I just need to get the switches right for it. I will do another search here and see what i turn up. Link to comment Share on other sites More sharing options...
war59312 Posted November 14, 2005 Share Posted November 14, 2005 (edited) I use::QUITIF EXIST Install.cmd (DEL Install.cmd)For Kerio try just /qn REBOOT=Suppress . Edited November 14, 2005 by war59312 Link to comment Share on other sites More sharing options...
qwerty1 Posted November 14, 2005 Author Share Posted November 14, 2005 war59312, im ok with the clean up thing now ive had it working. Kerio,s the problem. Ive tried loads of different switches ive found from searches here. With some, Kerio installs but my start.cmd gets terminated before it does the clean up, with others Kerio doesnt install and start.cmd runs. I tried the one you postedFor Kerio try just /qn REBOOT=SuppressBut i got the box with various switches and ok to click at the bottom and Kerio didnt install, the install and driver folders were deleted though. Link to comment Share on other sites More sharing options...
qwerty1 Posted November 15, 2005 Author Share Posted November 15, 2005 Finally managed to get the Kerio problem sorted, it now installs without any help from me and after install the start.cmd carries on and deletes required folders and itself. Thanks again the help everyone. Here is the switch i used its a modified version of one i found hereECHO.ECHO Installing Kerio Personal Firewallstart /wait %systemdrive%\install\kerio\kerio-kpf-4.2.0-785-win /S /V"/qn REBOOT=Suppress\"What could be a bonus is that Kerio appears to have been installed with advanced user selected. 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