# Fbcmd

**URL:** https://www.finalbuilder.com/forums/t/fbcmd/2037
**Category:** Discussion
**Created:** [October 9, 2012, 6:30am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037 "2012-10-09T06:30:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 9, 2012, 6:30am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/1 "2012-10-09T06:30:18Z")

</div>

We have FB Professional Edition running in a &nbsp;VM (Win7-64 VirtualBox) and have configure the build scripts which work as desired. We have a Jenkins-CI Job that connects to the VM via SSH and triggers the Build. The first script performs a PULL from our DVCS (Mercurial (Hg)). The command used is:

  

&nbsp; "C:\Dev\Tools\FinalBuilder 7\FBCMD.exe" /B /VBRANCH=%1 /VJENKINSBUILDNO=%2 /P"C:\Dev\Code\Project\BuildTools\FBScripts\HgPullUpdate.fbp7"

  
and we get the following error:  
  
&nbsp; ERROR! Package load error: C:\Dev\Tools\FinalBuilder 7\FBDelphiW32.bpl  
&nbsp; Error getting My Documents folder : Unknown error -2147024894 : The system cannot find the file specified  
&nbsp;&nbsp;  
would you hgave any idea why this is occurring?  
  
Thanks  
  
TFord

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 9, 2012, 7:27am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/2 "2012-10-09T07:27:43Z")

</div>

If the windows user that you are using via ssh has never logged into that machine before then the users profile will not exist on that machine. If that is not the case, then if the SSH server has an option to load the user’s profile then you may need to use it.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 10, 2012, 12:32pm UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/3 "2012-10-10T12:32:00Z")

</div>

Thanks for the quick response.  
  
From reading the forums, I thought that that was the issue but as you can see from the included logs, we are logged in under the ‘dev’ account. ‘dev’ is the account that we used when we developed our build scripts, which again we have verified work as designed.

Also, FBCMD is running. You can see that, although “FBDelphiW32.bpl” throws an ERROR)&nbsp;“HgPullUpdate.fbp7” job completes successfully. I believe this is because “HgPullUpdate.fbp7” is not using any code in&nbsp;“FBDelphiW32.bpl”. It’s not until the next build script in the chain (which require&nbsp;“FBDelphiW32.bpl” ) is called that we run into the error.  
  
[code]  
C:\Program Files (x86)\Jenkins\jobs\CI Default Build\workspace\>plink jenkins@ci-default -i JenkinsPrivateKey.ppk C:\SSHRoot\Build.bat default 32  
  
C:\Windows\system32\>Echo Off  
  
PsLoggedon v1.34 - See who’s logged on  
Copyright © 2000-2010 Mark Russinovich  
Sysinternals - [www.sysinternals.com](http://www.sysinternals.com)  
  
Users logged on locally:  
&nbsp; &nbsp; &nbsp;10/9/2012 1:32:53 PM &nbsp; &nbsp; &nbsp; CI-DEFAULT\dev  
=============================================  
&nbsp; Starting Project [default] Build  
=============================================  
  
Pulling tip from default branch  
ERROR! Package load error: C:\Dev\Tools\FinalBuilder 7\FBDelphiW32.bpl  
Error getting My Documents folder : Unknown error -2147024894 : The system cannot find the file specified  
Variable [BRANCH] set to [default]  
Variable [JENKINSBUILDNO] set to [32]  
  
Project File: C:\Dev\Code\Project\BuildTools\FBScripts\HgPullUpdate.fbp7  
  
Build Started: 10/9/2012 2:19:24 PM  
  
&nbsp; [Start ActionList: Main]  
  
&nbsp; &nbsp; [Mercurial]  
  
&nbsp; &nbsp; [Mercurial Pull]  
&nbsp; &nbsp; &nbsp; pulling from [http://sacsc01:8080/hg/rprox](http://sacsc01:8080/hg/rprox)  
searching for changes  
adding changesets  
adding manifests  
adding file changes  
added 5 changesets with 3 changes to 3 files  
(run ‘hg update’ to get a working copy)  
&nbsp; &nbsp; &nbsp; Success  
  
&nbsp; &nbsp; [Mercurial Update]  
&nbsp; &nbsp; &nbsp; 3 files updated, 0 files merged, 0 files removed, 0 files unresolved  
&nbsp; &nbsp; &nbsp; Success  
  
&nbsp; &nbsp; [Build Version Information]  
  
&nbsp; &nbsp; [Run DOS Command / Batch File [hg id \> C:\temp\changeset.txt]]  
  
&nbsp; &nbsp; &nbsp; &nbsp; Starting Directory: C:\Dev\Code\Project  
&nbsp; &nbsp; &nbsp; &nbsp; Parameters: /c hg id \> C:\temp\changeset.txt  
  
&nbsp; &nbsp; [Read Text File [changeset.txt]]  
&nbsp; &nbsp; &nbsp; Reading file…  
&nbsp; &nbsp; &nbsp; Escaping variables…  
&nbsp; &nbsp; &nbsp; Successfully read file c:\temp\changeset.txt  
  
&nbsp; &nbsp; [Save Variables to INI [BuildControl.ini, Variables: Branch,ChangeSet,JenkinsBuildNo]]  
&nbsp; &nbsp; &nbsp; Saving variables to INI file: C:\Dev\Code\Project\BuildTools\FBScripts\BuildControl.ini  
&nbsp; &nbsp; &nbsp; Variable “Branch” value saved  
&nbsp; &nbsp; &nbsp; Variable “ChangeSet” value saved  
&nbsp; &nbsp; &nbsp; Variable “JenkinsBuildNo” value saved  
&nbsp; &nbsp; &nbsp; Variables successfully saved  
  
&nbsp; &nbsp; [End ActionList: Main]  
  
Build Completed OK  
Elapsed time: 0hrs 0min 2sec 531msec  
  
Compiling Code  
ERROR! Package load error: C:\Dev\Tools\FinalBuilder 7\FBDelphiW32.bpl  
Error getting My Documents folder : Unknown error -2147024894 : The system cannot find the file specified  
ERROR! Required package for this project not loaded  
Missing package for Action class : TDelphiCompilerAction  
ERROR! Required package for this project not loaded  
Missing package for Action class : TDelphiCompilerAction  
ERROR! Required package for this project not loaded  
Missing package for Action class : TDelphiCompilerAction  
ERROR! Required package for this project not loaded  
Missing package for Action class : TDelphiCompilerAction  
  
Exit with return code: 13 (REQUIREDPACKAGENOTLOADED)  
  
=============================================  
&nbsp; Project [default] Build Failed!!  
=============================================  
&nbsp;[/code]

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 10, 2012, 1:07am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/4 "2012-10-10T01:07:09Z")

</div>

I had a look through the code, the delphi package is the only one that is looking for the user’s documents folder, and it’s doing that to deal with the BDSUSERDIR and BDSPROJECTSDIR variables.   
  
 I think the real issue is why is the SHGetFolderPath windows api failing to find CSIDL\_PERSONAL - this suggests that windows hasn’t loaded the user profile when fbcmd is invoked via ssh. Which SSH server are you using?

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 10, 2012, 2:29am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/5 "2012-10-10T02:29:54Z")

</div>

We are using FreeSSH.

Thanks

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 10, 2012, 5:05am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/6 "2012-10-10T05:05:45Z")

</div>

Are you able to try another ssh server, something like [http://www.bitvise.com/ssh-server](http://www.bitvise.com/ssh-server) - FreeSSHd is pretty basic, not to mention abandoned (no updated since 2009). It’s not free, but it has a 30 day trial so you should be able to test it easily enough.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 10, 2012, 6:42am UTC](https://www.finalbuilder.com/forums/t/fbcmd/2037/7 "2012-10-10T06:42:45Z")

</div>

Well I think we fixed the issue.&nbsp;

We are still using FreeSSH (for now). FreeSSH is running as a service on the "CI-DEFAULT" machine. We changed the FreeSSH&nbsp;  
service to "Log On" as the "dev" user account, giving it the "dev" credentials. The "dev" user account where we developed the build scripts and&nbsp;which runs FBCMB correctly. Now all is working as expected.

Thank you very much for all the help and responsiveness.&nbsp;
