Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"path not found" error with Vista

Status
Not open for further replies.

cyberblade3001

IS-IT--Management
Apr 25, 2008
1
US
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:

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
(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.
 
Did you try wrapping the path within Chr(34) tags to account for the spaces in the names?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top