Cameyo

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Set working directory in Cameyo
Anonymous

Date:
Set working directory in Cameyo
Permalink   
 


Is there a way to set a working directory in Cameyo, before executing program that is virtualised?

Example: I have packaged Python 3 with my script included. Script itself loads and saves files into currently set working directory.

By default it would be C:\Python32,  but I want it to be C:\Python32\MyScriptFolder

On Windows itself I either create .bat with text like:

"

cd C:\Python32\MyScriptFolder

C:\Python32\pythonw.exe MyScript.py

"

or create shortcut with equivalent commands and it works.

Can something like that be made in Cameyo?



__________________


Senior Member

Status: Offline
Posts: 268
Date:
Permalink   
 

Set the environment string:
CAMEYO_STARTINGDIR=C:\SomeDir

(see http://cameyoco.blogspot.com/2012/06/cameyo-20-geeks-only.html)

__________________
Anonymous

Date:
Permalink   
 

Still can't make it to work, I bypassed the problem for a while by setting directory inside Python script.

But still, how exactly should it work in Cameyo?

I imagine that I should set environment variables in Custom Events?

I put this line into On start (virtualized):

set CAMEYO_STARTINGDIR=C:\Python32\MyScriptFolder

It doesn't work.

 

Now if I add line

StartingDir=C:\Python32\MyScriptFolder

into VirtApp.ini all is working as it should. But that's not a solution, since it requires app already run at least once.



__________________


Senior Member

Status: Offline
Posts: 268
Date:
Permalink   
 

Packager.exe "-SetProperties:StartingDir=C:\Python32\MyScriptFolder" "C:\AppName.cameyo.exe"

(see blog)



__________________
Anonymous

Date:
Permalink   
 

Now it's working. Thanks!



__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard