Can anyone who is good in scripting tell me what I need to write so when runing my script it looks for files near it, something like script_path & your file. I cant manage to do that. Basically what I need is to run reg file from vbscript but cannot manage to do that coz don`t know how. What I can do is to put hard coded path and it workes but that is lame.
Dim objShell, objFSO, CurrentDirectory
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = objFSO.GetParentFolderName(WScript.ScriptFullName)
objShell.Run "RegEdit.exe /S " & Chr(34) & CurrentDirectory & "\MyRegistry.reg" & Chr(34)
Set objShell = Nothing
Set objFSO = Nothing
Looks like I really mesed up this question, will try different way. I have reg file which need to be runed from vbs because vbs installs application and in the end I want that the same vbs runs reg file which is in the same location where vbscript is, so I don`t know how to write correct path so vbs see that reg file is in the same location. Hope that was more explained.