01-11-2015 09:14 AM
Hi all,
I have a bpstart_notify.policyname.bat script that i want to use to carry out my script commands and mount my drive to be backed up when the policy starts. My script is something like this:
--------------------------------------------------------------------------------------------------
::Open a putty session and execute the command.
plink -ssh -l user1 -pw password -m c:/myscriptlocation/myscript.txt
::mount my drive
mountvol f: \\?\volumename\
--------------------------------------------------------------------------------------------------
When I run this script on the command prompt manually, it executes perfectly. But when i run the policy and let nbu run the script automatically, it doesn't seem to work properly. Namely, the first command (plink) doesn't happen, and the next command, mountvol runs.
Seeing that the mountvol command was executed suggests that NBU did indeed execute the script, but i'm unsure of why it was not able to run my plink command.
Any ideas on what the problem might be?
01-11-2015 08:18 PM
Is plink's location present in the PATH env variable? Try with the full path C:\Program files(x86)\Putty\Plink.exe
01-12-2015 05:35 PM
Hi Riaan,
Yes the PATH variable for plink was already added. As mentioned I had no problems running the script in the command prompt manually. Though to answer your question, we already tried with the full path but it didn't work.
01-12-2015 08:36 PM
Try adding logging to your script so you can see what its doing (or not doing).
01-12-2015 11:10 PM
What happens if you put :
::Open a putty session and execute the command.
plink -ssh -l user1 -pw password -m c:/myscriptlocation/myscript.txt
::mount my drive
mountvol f: \\?\volumename\
... into another script eg. myscript then run it, does that work ?
If it does, then you could then call myscript from bpstart_notify and see if that works.
01-14-2015 06:05 PM
01-30-2015 10:38 AM
I have the same question.
I put plink in my parent_start_notify.cmd, it not works. :(
01-30-2015 11:33 AM