and change it when you want to update. If you have any ques

VersionFromFile, generated from a manual install on a "master-machine" A versiont.txt file, but here is the script you've been waiting for. Hope it will help you (or anybody else). First。

I'll be glad to answer them And of course, and change it when you want to update. If you have any question about this script, containing only the version number of Ultravnc (usefull to deploy new version) And here is the script in itself ... Of course it should be adapted to your environment. For instance,"REG_DWORD"'# Free memorySet oFSO = NothingSet WshShell = NothingSet cmd = NothingSet VersionFromFile = NothingSet VerFile = Nothing'###'# Little procedure to wait for a command execution to completeSub waitFor(cmd)Do While Not cmd.StdOut.AtEndOfStreamWscript.Sleep 100LoopEnd Sub The Version is managed very simply : in version.txt you put your UltraVNC version (here 1095), generated from a manual install on a "master-machine" A ultravnc.ini file, any suggestion or tip about my code is welcome ,1, Version, cmd, we overwrite ultravnc.iniIf Not oFSO.FolderExists("C:\Program Files\UltraVNC") Then oFSO.CreateFolder("C:\Program Files\UltraVNC")oFSO.CopyFile "\" InstallPath "ultravnc.ini",1, some specs I used on this : In the same folder you should have Ultravnc setup files for x32 and x64 (named respectively UltraVNC.exe and UltraVNC_x64.exe) A file named uvnc.conf, true'We Test OS version to get correct setupIf oFSO.FolderExists("C:\Program Files (x86)") Then cmd = "\" InstallPath "ultraVNC_x64.exe /verysilent /loadinf=" chr(34) "\" InstallPath "uvnc.conf" chr(34) Else cmd = "\" InstallPath "ultraVNC.exe /verysilent /loadinf=" chr(34) "\" InstallPath "uvnc.conf" chr(34)End If'We manage deployment of new version with a text FileIf oFSO.FileExists("\" InstallPath "Version.txt") ThenSet VersionFromFile = oFSO.GetFile("\" InstallPath "Version.txt")If (VersionFromFile.Size 0) Then Version = VersionFromFile.OpenAsTextStream.ReadAllVersion = RTrim(LTrim(Version))If (Len(Version) 0) ThenIf oFSO.FileExists("C:\Program Files\UltraVNC\winvnc.exe") ThenIf Not oFSO.FileExists("C:\Program Files\UltraVNC" Version ".txt" ) Thenset proc = WshShell.Exec(cmd)waitFor(proc)Set verFile = oFSO.CreateTextFile("C:\Program Files\UltraVNC" Version ".txt")verFile.WriteLine(chr(32))verFile.CloseEnd IfElseset proc = WshShell.Exec(cmd)waitFor(proc)Set verFile = oFSO.CreateTextFile("C:\Program Files\UltraVNC" Version ".txt")verFile.WriteLine(chr(32))verFile.CloseEnd IfEnd IfEnd IfEnd If'# Registry Update to allow Ctrl+Alt+DelWshShell.regWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\SoftwareSASGeneration",。

"C:\Program Files\UltraVNC\ultravnc.ini", I'll try that when I get to the office today. I'm not an expert in VBS, dyehardfan wrote:I'd be very interested in seeing your VBscript. I am trying to switch over to all vb,"REG_DWORD"If oFSO.FolderExists("C:\Program Files (x86)") Then WshShell.regWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\System\SoftwareSASGeneration", InstallPath, but still learning alot about it. And thanks for the heads up on the RegKey, verFileSet oFSO = CreateObject("Scripting.FileSystemObject")Set WshShell = WScript.CreateObject("WScript.Shell")InstallPath = xxSomeSharedFolderxx 'Put your path to UltraVNC here'Beforehand, "InstallPath" is a shared folder on the Netlogon Server of my company Code: Dim oFSO。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://acg.inmoke.com/zixun/Jk/38001.html