Cameyo

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: AppData on Windows server 2012 ?


Veteran Member

Status: Offline
Posts: 49
Date:
AppData on Windows server 2012 ?
Permalink   
 


Hi

When I play my app Rebeka.exe it copies some files from the application folder (normally C:\Program Files (x86)\REBEKA2\) to the AppData folder (usually in %USERPROFILE%\AppData\Roaming\Rebeka). But on Cameyo server AppData doesn't seem to be set because my app copies the files to C:\Program Files (x86)\REBEKA2\Rebeka.

Is this the normal behaviour on a Windows 2012 server or specific for the Cameyo server?

It could be that my function to read the AppData path doesn't work correctly because it returns "" for the Cameyo server.

It reads the following registry entry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData

Thanks,

Rolf

 

 



__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

Hello Rolf,

Please PM me a link to the installer file so we can take a look.  I was unable to reproduce with a simple command that wrote to %AppData%.



__________________


Veteran Member

Status: Offline
Posts: 49
Date:
Permalink   
 

Hello Mule,
I sent you the link to my app by PM.
The installer copies all files to the program folder.
The app creates a folder %AppData%
ebeka at start-up and copies some files (ini file and other files which are re-written by the app) to this folder in order to prevent writing files to the program folder in the future.
This is only done if the folder %AppData%
ebeka doesn't yet exist.
In the tab 'Infos' you can see which files the program copies and the paths read.

I can also send you the installer file but it doesn't try to read AppData.

__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

Hmm, it turns out that there are no values in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders for RemoteUsers set up by Play Server.  I was told by R & D that it is best to not use the registry directly.



__________________


Veteran Member

Status: Offline
Posts: 49
Date:
Permalink   
 


So, I should use environment variables (like %AppData%)? I will test it with a small program.
I looked at Win XP, 7 and 10. They all have these registry entries.

__________________


Veteran Member

Status: Offline
Posts: 49
Date:
Permalink   
 



My test program returns the right environment string for %AppData%

GetEnvString: C:\Users\RemoteUser2\AppData\Roaming

The registry key is empty.

__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

Yes, please use environment variables.  Server 2012 has registry entries; it is Play Server that does not create the values for the RemoteUsers, i.e. the users who are playing.



__________________
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