Hi,
is it possible to kwnow where VISTA puts (the folder) the program menu installed ?
Undex XP i used the function GETPROGDIR() the retrieve it, but undex VISTA it does not work.
Undex XP i usually got the folder:
C:\Documents and Settings\All Users\Starts Menu\Programs\MY-FODER
where MY-FOLDER is my searched folder.
Any help ?
tks
Romeo/Zingoni
--------------------------------------------------------------------------------
Salve,
sapete dove mette VISTA i programmi che si installano con la procedura di FWIN/HARBOUR ?
Per intenderci quelli che usano:
*************
DEFINE DDE oDDE ;
SERVICE "Progman" ;
TOPIC "Progman"
ACTIVAT DDE oDDe
oDDE:Execute(....)
.
.
RELEASE DDE oDDE
***************
Con XP va tutto bene, mantre con VISTA creo correttamente il gruppo ma non so (in che cartella) lo va a scrivere.
Usavo la funzione recuperata sul forum GESTPROGDIR() per saperlo e con XP funziona ma VISTA la va a mettere in una stranissima cartella.
C'e' in giro qualche funzione per recuperarla !
Grazie
Romeo/Zingoni
GETPROGDIR()
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
I think it's mine:
EMG
Code: Select all
#define HKEY_CURRENT_USER 2147483649
#define HKEY_LOCAL_MACHINE 2147483650
#define KEY_ALL_ACCESS 983103
FUNCTION GETPROGDIR()
LOCAL hKey := 0
LOCAL nType := 0
LOCAL cData := SPACE( 256 )
LOCAL nSize := LEN( cData )
IF !ISWINNT()
REGOPENKEY( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", 0, KEY_ALL_ACCESS, @hKey )
REGQUERYVALUE( hKey, "Programs", 0, @nType, @cData, @nSize )
ELSE
REGOPENKEY( HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", 0, KEY_ALL_ACCESS, @hKey )
REGQUERYVALUE( hKey, "Common Programs", 0, @nType, @cData, @nSize )
ENDIF
REGCLOSEKEY( hKey )
RETURN LEFT( cData, AT( CHR( 0 ), cData ) - 1 )
DLL32 FUNCTION REGOPENKEY( hKey AS LONG, cSubKey AS LPSTR, nOptions AS DWORD, nSamDesired AS DWORD, @nHandle AS PTR ) AS LONG;
PASCAL FROM "RegOpenKeyExA" LIB "advapi32.dll"
DLL32 FUNCTION REGQUERYVALUE( hKey AS LONG, cValueName AS LPSTR, nReserved AS LONG, @nType AS PTR, @cData AS LPSTR, @nSize AS PTR ) AS LONG;
PASCAL FROM "RegQueryValueExA" LIB "advapi32.dll"
DLL32 FUNCTION REGCLOSEKEY( hKey AS LONG ) AS LONG;
PASCAL FROM "RegCloseKey" LIB "advapi32.dll"
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Mr. Enrico
Excellant.
I am now using the following for the above purpose.
(Getobject is my function which is nothing but try GetActiveObect cach createobject ... )
This is working on XP and 2000/2003. I personally dont have access to other windows versions.
Can you or anyone else please advise if this works on other versions too? In particular Vista ?
Regards
Nageswara Rao
Excellant.
I am now using the following for the above purpose.
Code: Select all
GetObject('WScript.Shell'):SpecialFolders:Item('AllUsersPrograms')
This is working on XP and 2000/2003. I personally dont have access to other windows versions.
Can you or anyone else please advise if this works on other versions too? In particular Vista ?
Regards
Nageswara Rao
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India