Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 2:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: script ftp download - ok vista - ok win7 - not ok XP
PostPosted: February 1st, 2010, 7:30 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Hi all,

I've got several problems that drive me mad since two weeks.
Hope that some expert users can help me.

Context:
- a multimedia software built with Opus 6
- odbc link with Access that works fine
- a new "update page" with a script that does the following:
1/ writes a A.cmd file that contains all parameters to ftp-download from my server a B.txt file that contains updated data for the Access database
2/ executes the A.cmd file
3/ reads date of the patch at first line of B.txt and stores it in a variable called 'datepatch'
4/ if date of patch > date of installed database --> update
5/ etc

Problem1:
- under Vista on my PC in Geneva, script works fine
- under Vista on a friend's PC in Houston TX, script doesn't function: 'datepatch' is set to 0 which indicates that first line of B.txt is not read

Problem2:
- my ftp-script is supposed to download B.txt to <SYSTEM_PUBLICATION-DIR>
- That is the case at first launch...
- ...but not at 2nd launch: B.txt is downloaded to 'Virtualstore'
- at the same time a copy of the access database is also created in Virtualstore...
- Is is possible to force all transactions to stay in program files?
- Any relation with Admin rights?

Problem3:
- As I said previously, under Vista and Win7, A.cmd will function (at least once!) and download B.txt;
- Under Windows XP, the A.cmd black dos screen will pause/freeze for ~2 minutes after the instruction 'get B.txt'...
- then show a failure to connect / timeout message
- Strangely, same ftp instructions put manually, one by one, in a cmd windows work perfectly and download B.txt
- Why does XP create a pb there while Vista and Win7 seem to do the job?

2 weeks that I fight against those 'vaudou' things...
Thanks for expert advice.

Winfried

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 1st, 2010, 11:58 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Winfried,

This is a rather complex problem that might be better solved if you can post the files involved.

However, there are some points that do need addressing;

You don't state what level of access these different users have and whether UAC is on / off / silent.

Also, you are trying to write to the program files directory under Vista / W7 - which is a big NO and hence the Virtual Store. You should use the Programs Data directory but will need Opus 7.0 for easy access to that path.

Hope this starts the ball rolling.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2010, 11:33 am 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Hi Mackavi,

First thanks for your quick reply.

Here are the main files requested.

Regarding Opus 7, I am an early bird user.
I bought it but cannot use it now since OP7 mixes up all fonts in my OP6 publications. Small bug certainly, but no time for me at present. I need to finish my programme in OP6.

UAC might be part of the problem, but I do not know what to do.
> Should my program always be started in Admin mode?
> Can I add some code in my programme to do so?
> What is the 'strategy' to cope with Virtualstore?
> Example of code to insert?
> What about the ftp.exe pb in XP?

Thanks for the time reading my scripts.

Winfried


You do not have the required permissions to view the files attached to this post.

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2010, 12:24 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Hi again,

found that topic on the board:
viewtopic.php?t=3129&highlight=uac

Could that be the solution to my problems?

Winfried

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2010, 9:37 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Winfried
Quote:
since OP7 mixes up all fonts in my OP6 publications.
Am curious. Did you install OpusPro v7 in the default path? (and you left Opus v6.x installed as it was?)

I'll have to test out some of my old Pubs. But so far, opening an old .IMP in Opus v7 seems to convert simply and cleanly.

I asked the above question because previously when I installed v6.4, I put it in a directory I chose to name -- and I had several problems with some standard application resources. Solved by reinstalling in default path.

As for the ftp and web problems posted, not my area of expertise.
As for AB .cmd.txt files, I think Mack has pointed you in the right direction regarding UAC and paths. 'paths' should be easy to troubleshoot. Vista and XP differ in how they handle the file system --- so you have to look for the common denominator (what path and directory will exist in both, and also have same user access/permissions).

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 2nd, 2010, 9:48 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Hi Lar,

Thanks for your message.

I indeed installed OP7 in the default path.

1st old pub that I opened with OP7 was ok : no font change.
That one was made with OP5.x if I remember well.

2nd old pub was made with OP6.4.

I am currently following Mack's guidelines and do modifications and tests. I'll post later the results later to feed this forum.

Winfried

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2010, 11:07 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
since OP7 mixes up all fonts in my OP6 publications
Just a couple quick points on that.

1--- if you can track down the cause of that problem, that would be good of course. I would look back at system configurations at the time it was created in v6.x, and see if installed fonts then were different versus now. [Edit:] You should also review Control Panel >>> Features & Programs to see what else on your system has changed between time Opus v6 was installed and now (other programs and utilities installs/UNINSTALLS may have changed things?)

2--- getting old pubs working. Two ideas.
One OpusPro has a feature to 'globally' change a font for a pub. Look up in the menus. Tools >>> Replace Font
Second, if you go back to v6 and publish TO INCLUDE the fonts used, you may be able to find those in that resulting resource folder,... and re-use them over in v7 somehow. But then maybe not so.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Last edited by Lar_123 on February 2nd, 2010, 11:23 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: February 2nd, 2010, 11:21 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Ok Lar. I'll do my best to track down the cause of the problem.

First, I must finish and deliver my current programme.

I'd like to post a simple question:

Under which directory do experts suggest that files that can be modified (after a ftp-download / update) should be installed...

> ...under XP?
> ...under Vista?
> ...and under Win7?

<SYSTEM_DOCUMENTS_DIR> ?
Windows Temp Directory?
Other?

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2010, 11:42 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
I tried again to open my current OP6.4 publication with OP7.
Strange and good new : this time no problem with fonts!
I did not reinstall OP7.


I also realize that OP7 now contains a new variable called <SYSTEM_PROGRAMDATA_DIR> which is probably meant to handle data in Virtualstore under Vista.

> Can anyone confirm? Thanks in advance.

I discovered it by chance, since it can not be found by a simple search in the help file, nor in the help file 'new features'.

Considering the problem I experience (see my above questions) it might be relevant and important to stress that important new feature.

A last question: I'm not an expert of Win7. Will <SYSTEM_PROGRAMDATA_DIR> work the same for Win7 as for Vista?

Thanks in advance.

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 3rd, 2010, 5:10 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
You have several choices on where to store data.
You can use <SYSTEM_PROGRAMDATA_DIR>; it's the same folder for both Vista and Windows 7.
On my computer it's "C:\ProgramData".

However the OS has fewer restrictions with what happens in the logged in user space. That makes it the most reliable place to store data that might change. Some commonly used areas for apps to store data in are::

User/AppData/Local
User/AppData/Local/Temp (<SYSTEM_TEMP_DIR>)
User/AppData/Roaming

Paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 4th, 2010, 2:12 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
UAC might be part of the problem, but I do not know what to do.
Here's a Primer on UAC if you want to get some perspective about it.
http://technet.microsoft.com/en-us/libr ... 9628(WS.10).aspx

Quote:
Under which directory do experts suggest that files that can be modified... should be installed...

I did a little searching on this (for myself, as I too am trying to understand... Vista changes and beyond).
For starters, here is one earlier discussion (there may be more posts in this forum): viewtopic.php?t=3129&highlight=write+directory

I searched MS/Win related sites some, and come up with this (non-definitive but relevant?) analysis. (i would skip the first 5/6 of webpage -- holy moly!!!).
http://blogs.msdn.com/rflaming/default.aspx?p=4

Quote:
The next question in my investigation was "what is the exhaustive list of locations that a Standard User will have write access to?". Turns out I could not find the definitive answer. The closest thing I got was that a Standard User CAN'T write

* Anything protected by Windows Resource Protection.
* Anything under c:\Windows
* Anything under c:\Program Files
* Anything under c:\Users\<Other Peoples Profiles>
* Anything in c:\Users\All Users
* Anything under c:\Program Data
* Anything under the non-mapped root drive (c:, d:, e:, etc)

There are two variables in this equation

* Setup programs that are running as administrator can loosen ACLs on anything not Windows Resource Protected
* Non-setup programs can have their writes to protected locations appear to succeed only to have Virtualization actually redirect to user writeable location.

FWIW... I had trouble keeping this in my head ;^). I continue to consult friends on UAC which you can do via their blog.
Did anybody else also get a brain bend out of that site? :shock:

So, I am no 'expert'. I will just offer what I am thinking for some of my future Pubs... more of a 'what to consider'.
-- C:\Program Data...
I would be tempted to use that --- IF the distributed Opus Pub was going to be installed on the client machine, and IF it was Opus pub that was writing the data to files. I hope Virtual Store is something I don't have to worry about.
I am thinking about creating certain 'placeholder' files to be put in place at time of install (don't know if that's a necessity).
-- C:\Users\AppData\Local\OpusPubName\UserKeep
or C:\Users\AppData\Local\OpusPubName\PubWorking
I will likely use something like the above for both 'installed Pubs' and for 'Pubs run from files' (e.g., run from USB, a Flex Pub, etc.). My pubs are most likely dedicated to one-user.
-- testing: I still need to understand how Virtual Store gets involved... specifically if a User's session is interrupted. Also, Roaming directory vs. Local.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 4th, 2010, 4:34 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Winfried,

Yet another link... general Win Vista.

http://blogs.msdn.com/cjacks/archive/20 ... files.aspx
Comment: A very interesting discussion (actually... a fragmented debate with recommendations and contraopinions... on the original question: Where Should I Write Program Data Instead of Program Files? ).

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: February 4th, 2010, 11:06 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Unless this is a Vista 'thing' - it's wrong.

ProgramData is available to a standard user with all default Windows (7) settings enabled.

Given as the user can move the majority of their libraries there are probably two main relative paths available for Opus data storage.
The ProgramData folder and the My Documents folder.

Personally, storing data in the My Documents folder - should be at the discretion of the user not the program author.

ProgramData should hold files relevant to the program that affect all users.

What is really needed is a variable that gives the user AppData location so as to store program data on a per user bases.

However, until that is available, it seems polite to store data that will be accessed by the program under the ProgramData folder and simply use the username variable to subgroup.

I use the term data to reference files that are non executable - these should be installed in the Program Files folder or updated from a temporary location.

One issue with Opus is generally that the publications are portable and non-technical persons may be inclined to simply run the program from an unsuitable location. There are justifiable times when this is necessary but unless that is the case - publishing as part of an installer package is good practice. There are many great installer (free) programs available including the one built into Opus.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 4th, 2010, 11:19 pm 
Offline

Joined: February 12th, 2005, 3:42 pm
Posts: 28
Location: Switzerland
Opus: 9
OS: Windows 7 Enterprise
System: DELL LATITUDE E7240
Hi Paul, Lar_123 and Mack!

At first, let me thank you for the time you spent reading my posts and answering to them. It is a great help for 'amateurs' like me :-)

I have read everything you wrote in details. I have followed links recommended by Lar_123, and read carefully.
I was, in particular, very interested by Chris Long's approach, but I also understand that experts still do not agree on ideal 'strategy'.

I also understand Mack's recommendation : " What is really needed is a variable that gives the user AppData location so as to store program data on a per user bases. However, until that is available, ..."

I will now test different scenarii until I find a reliable solution for my program under XP, Vista and Win7.

Maybe my next question is stupid, but let me put it and I'll know:
> Is there a way in OP7 to code/script the path to user/<currentuser>/AppData?

I also have a question to Mack :
> Do you know if Opus Pro Developpers can/will follow your recommendation and supply us, in a future upgrade, with a new variable that gives the user AppData location?


Best regards,

_________________
Winfried
Geneva

Opus Pro 7 - Vista 32 Family Ed. Premium - HP pavillon dv6000 - Core 2 duo 1.6Ghz - RAM 2GB - Nvidia Go 7400


For this message fifid has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 5th, 2010, 1:03 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
The user/AppData path is easy to get...
The SYSTEM_TEMP_DIR will return the path to the temp directory nested inside the AppData folder.

C:\User\Username\AppData\Local\Temp\

Now remove "\Local\Temp\" off the end of the string by:

1) split the string on the slash separators into an array with...

pathSplit = tempDir.split("\\");

2) Re-assembling the first four array elements to get the path to the user/AppData folder...

path = pathSplit[0]+"\\"+pathSplit[1]+"\\"+pathSplit[2]+"\\"+pathSplit[3];

cheers
paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group