cyberblade3001
IS-IT--Management
Ok, so I'm not too good at scripting-but usually google and I can get a working script without it being too much of a problem. Here's what I started out with:
I KNOW that the path is correct, but it gives me a "Path not found" error. I can browse to that same path though. The issue (as far as I can tell) is with Vista's "security features".
I found the following script that is supposed to elevate privileges, but it hasn't changed anything:
(that code found at )
Both those scripts are in a folder along with the jvm.dll file that I'm trying to copy.
Also, running command prompt as administrator and launching the script from there also failed. Had a friend try it with PowerScript and also, anytime you're trying to work with C:\Program Files you get errors.
Any help would be much appreciated.
Code:
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot\jvm.dll" , "C:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot\jvm-backup.dll"
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "jvm.dll" , "C:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot\", OverwriteExisting
I KNOW that the path is correct, but it gives me a "Path not found" error. I can browse to that same path though. The issue (as far as I can tell) is with Vista's "security features".
I found the following script that is supposed to elevate privileges, but it hasn't changed anything:
Code:
Set objShell = CreateObject("Shell.Application")
Set FSO = CreateObject("Scripting.FileSystemObject")
strPath = FSO.GetParentFolderName (WScript.ScriptFullName)
If FSO.FileExists(strPath & "\move-dll.vbs") Then
objShell.ShellExecute "wscript.exe", _
Chr(34) & strPath & "\move-dll.vbs" & Chr(34), "", "runas", 1
Else
MsgBox "Script file move-dll.vbs not found"
End If
Both those scripts are in a folder along with the jvm.dll file that I'm trying to copy.
Also, running command prompt as administrator and launching the script from there also failed. Had a friend try it with PowerScript and also, anytime you're trying to work with C:\Program Files you get errors.
Any help would be much appreciated.