Jump to content

OffHand

Member
  • Posts

    20
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Netherlands

About OffHand

OffHand's Achievements

0

Reputation

  1. Hi there, That was left from the old script and would only execute if VNC was installed. It's obsolete now most likely. I do not have time to test your code right now but will do so first thing in the morning. I hope you can check back tomorrow to verify it worked. Thanks a lot for your help and tips! I really appreciate it. Cheers, Marty P.S. All the files are in the same dir. It's working now! After a good night of sleep I decided to double check all the files/locations and it turned out I placed them in a wrong dir... My bad! By the way... I had to stop and delete the services when upgrading in order to circumvent a popup dialogue during (silent) install. Thanks for your help again! Kind regards, Marty
  2. Hi there, That was left from the old script and would only execute if VNC was installed. It's obsolete now most likely. I do not have time to test your code right now but will do so first thing in the morning. I hope you can check back tomorrow to verify it worked. Thanks a lot for your help and tips! I really appreciate it. Cheers, Marty P.S. All the files are in the same dir.
  3. I got a little bit further. Since it's safe to assume that the update version can run on any machine which has ultravnc already installed (so no version check needed) I changed the command into the following: Set K_="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ultravnc2_is1" Reg query %K_%>Nul 2>&1&&( Echo:UltraVNC already installed - updating to version 1.0.8.2... && UltraVNC_1.0.8.2_update.exe)||( Echo:Installing UltraVNC...&sc stop uvnc_service&sc delete uvnc_service© /y ultravnc.ini "C:\Program Files\UltraVNC"&UltraVNC_1.0.8.2_Setup.exe /loadinf="180vncinstall" /verysilent) Which gives me the following error: UltraVNC version 1.0.5.1 or higher already installed, updating to version 1.0.8. 2... '"UltraVNC_1.0.8.2_update.exe"' is not recognized as an internal or external com mand, operable program or batch file. Installing UltraVNC... What am I doing wrong?
  4. Hi Guys, Can someone help me out with the following code? Basically it needs to run the update version of the vnc installer if version 1.0.5.1 or higher is installed and the full version if no vnc has been installed. The code below doesn't work yet. REM Check for existence of UltraVNC version 1.0.5.1 Set K_="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ultravnc2_is1" Set "P_=1.0.5.1" Reg query %K_% /v DisplayVersion|Find "%P_%">Nul 2>&1&&( Echo:UltraVNC version 1.0.5.1 or higher already installed, updating to version 1.0.8.2... && UltraVNC_1.0.8.2_update.exe)||( Echo:Installing UltraVNC...&sc stop uvnc_service&sc delete uvnc_service© /y ultravnc.ini "C:\Program Files\UltraVNC"&UltraVNC_1.0.8.2_Setup.exe /loadinf="180vncinstall" /verysilent) Thanks in advance! Marty
  5. Managed to get it working with the following script: @Echo off REM This will check if there is a previous version of VLC and uninstall it if it finds it if exist "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" ( Echo Uninstalling previous VLC version... && ping -n 5 127.0.0.1>nul start /wait "VLC Uninstall" "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" /S) REM I am removing the old VNC directory here. ping -n 10 127.0.0.1>nul ECHO Removing old VLC directory... ping -n 2 127.0.0.1>nul RMDIR "%ProgramFiles%\VideoLAN" /S /Q REM And install the new version. ECHO Installing VLC... vlc-0.9.4-win32.exe /S
  6. Thanks for the link but it looks like a pretty complex solution for what I want to achieve. For instance I do not care which version is installed. But I will try a few things tomorrow when I am at work and report back. Cheers, OffHand
  7. Hi guys, Can anyone help me out or point me in the right direction with the following bat script. What I would like it to do is check if VLC has been installed already, if it finds it uninstall it and install the new version. If it hasn't been installed already it should just install VLC. This is what I have so far but it still thinks VNC is installed. @echo off echo Removing VLC media player set VLANDIR=C:\Program Files\VideoLAN set UNINSTALLER=%VLANDIR%\VLC\uninstall.exe set OPTIONS=/S if not exist "%UNINSTALLER%" goto good_end start /wait "VLC uninstall" "%UNINSTALLER%" %OPTIONS% REM Unfortunately the uninstaller seems to fork a child process and the parent REM process exits immediately. So give it some time to uninstall ping -n 5 127.0.0.1 > NUL :good_end ECHO Installing VLC... vlc-0.9.4-win32.exe /S
  8. Thanks everybody who replied and helped... it is really appreciated I am happy with what I got now. The chances that Y is not a network drive are very slim... pretty much zero, so it's not really necessary to check if it actually is a network drive. Peace, Martijn
  9. It wouldn't cause damage, it would fail twice whereas your original attempt was a problem if it failed once! Your request was to check if a network drive was connected to Y: all I did was warn you that the script didn't do this! Aite... thanks
  10. Thanks a lot! Works great! All I had to add was a small pause so users can read the feedback. if exist Y: ( ECHO Y: Needs to be disconnected... Disconnecting drive now. ping -n 5 127.0.0.1>nul && net use Y: /delete ) ECHO Mapping network drive... net use Y: "\\it-server\software\winsoft"
  11. Hi guys, Is there a way to check if there is a network drive connected that uses a specific letter (Y: in my case)? In order for my script to run properly it needs to mount a network drive with the letter Y: What I have now works, but it displays an error message if the drive is not mounted. ECHO The Y: drive needs to be disconnected in order for this script to run pause net use Y: /delete ECHO Mapping network drive... net use Y: "\\it-server\software\winsoft" Now what I would like is: command that checks if the drive is in use... if Y: is in use ECHO Y: Needs to be disconnected... Disconnecting drive now. net use Y: /delete if Y: is not in use ECHO Mapping network drive... net use Y: "\\it-server\software\winsoft" Your help is greatly appreciated! Thanks in advance... Martijn
  12. I figured it out.... Set K_="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" Set "P_=Service Pack 3" Reg query %K_% /v CSDversion|Find "%P_%">Nul 2>&1&&( Echo:%P_% Already Installed. Please reboot now && ping -n 60 127.0.0.1>nul)||( Echo:Installing %P_%&WindowsXP-KB936929-SP3-x86-ENU.exe /quiet)
  13. It works. The only thing that does not work (maybe it works but the message might be gone before I can see it) is when SP3 is already installed it does not echo 'Service Pack 3 Already Installed. Please reboot now.' The script just ends. Is there a way to work around this? Maybe a pause or a command that reboots the machine after pressing a key? The later one would be ideal.
×
×
  • Create New...