Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-03-2018, 02:47 AM
dnb dnb is offline
Registered User
 
Join Date: Sep 2018
Posts: 3
Putty import script error

Hi Guys,

Hope you can help. I'm attempting putty database import to newly acquired securecrt. Downloaded the script but I'm getting the following error when I run it

VBScript runtime error
Error: Path not found
File: ...\ImportPuttyDatabaseIntoSecureCRTSession.vbs
Line: 693

Here is the line 693
Set objFile = g_fso.OpenTextFile(g_strLogFile, 8, True)

How can I fix it?
Reply With Quote
  #2  
Old 09-03-2018, 11:53 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 74
Hi dnb,

What operating system are you running SecureCRT on?

Can you please add the following line of code right after line 64 in the script?

Code:
msgbox "Log File Path: " & g_strLogFile
Once you have added the above line, please re-run the script.

What log file path is displayed in the message box when you run the script?
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 09-04-2018, 02:33 AM
dnb dnb is offline
Registered User
 
Join Date: Sep 2018
Posts: 3
Hi berdmann,

I'm running Win10 Ent x64

Here is the part of the output I'm getting after adding the recommended line to the script

..\Desktop\SCRT_Ptty_importScriptLog_20180904_092100.913.txt
Reply With Quote
  #4  
Old 09-04-2018, 10:12 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 74
Hi dnb,

Are you getting literally the exact string that you posted?

If you are getting exactly "..\Desktop\SCRT_Ptty_importScriptLog_20180904_092100.913.txt" it sounds like modifications have been made to the original script example. If the original script code is run without modifications it would not be able to return the result you have indicated.

What happens if you download the script fresh and run it without any modifications?

What are your results?

If you continue to get the same results then you will have to hard code the value for this variable to be the literal path to the log file the script should use for reporting information/progress.

For example,

Replace line 62 (which continues on 63 and 64) with the following:
g_strLogFile = "C:\put\your\path\here\SCRT_Ptty_ImportScriptLog_" & GetTimeDateWithMilliseconds & ".txt"
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 09-11-2018, 04:12 AM
dnb dnb is offline
Registered User
 
Join Date: Sep 2018
Posts: 3
Hi berdmann,

I've replaced the line 62 as suggested, it worked.

Thank you!
Reply With Quote
  #6  
Old 09-11-2018, 08:40 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 74
Hi dnb,

I am happy to hear that you were able to run the script successfully after making the requested change! Thank you for your feedback!
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
putty


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:37 AM.