ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Windows Vista
  • Overview
  • FAQ
  • In Windows Vista/7/8, I start my application with the "Administrator" privileges and I lose my network connections. Why can I no longer use the drive letters?
  • Windows Vista/7/8 does not allow any write operation into "C:\Program Files". How to take this constraint into account in my application?
  • Windows Vista/7/8 does not allow any write operation into "HKEY_LOCAL_MACHINE\Software". How to take this constraint into account in my application?
  • I am using INIWrite and INIRead without specifying the path in Windows Vista/7/8. My application operates properly but the INI file is never created in the Windows directory. Why?
  • I have created a context-sensitive help in hlp format. This help does not start in Vista/7/8. How to proceed?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
This help page presents a list of problems that may occur when using Windows Vista (and later). This list will be updated whenever a new version becomes available.
For more details, see Tips for programming in Vista.
FAQ

In Windows Vista/7/8, I start my application with the "Administrator" privileges and I lose my network connections. Why can I no longer use the drive letters?

It is a security option of Windows Vista/7/8 and UAC. The network drives are disconnected when the user privileges are elevated.
They must be specifically reconnected. To do so, use the NetworkConnect function.
Example:
NetworkConnect("S:", "\\Server\share", "user", "password")
Remark: The user and password parameters must necessarily be specified in this case because Windows considers that the user changed.

Windows Vista/7/8 does not allow any write operation into "C:\Program Files". How to take this constraint into account in my application?

For the applications that are using HFSQL files locally, you must now use the relevant Windows directory. For Vista/7/8, it is "C:\ProgramData".

The following code may be helpful:
sDataDir is string
sDataDir = CompleteDir(SysDir(srCommonAppData)) + fExtractPath(ExeInfo(exeName), fFile)
fMakeDir(sDataDir)
HChangeDir("*", sDataDir)
HCreationIfNotFound("*")

Windows Vista/7/8 does not allow any write operation into "HKEY_LOCAL_MACHINE\Software". How to take this constraint into account in my application?

You use an application without privileges (UAC mechanism) ; therefore, you have no rights to write into "HKEY_LOCAL_MACHINE\Software".
In this case, Windows writes your key into another directory: it is called "Registry virtualization". The following key is used by Windows: "HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE". For more details, see UAC mechanism.
To avoid having this problem, we advise you to write the key of your application into another key of registry.
The administrator privileges can also be granted to your application (by including a manifest when creating the executable).
Caution: If several applications share the same information in the registry, these applications must use the same "Administrator" privileges or even better, the entries in the registry must be made accessible to the different applications.

I am using INIWrite and INIRead without specifying the path in Windows Vista/7/8. My application operates properly but the INI file is never created in the Windows directory. Why?

You are using an application without privileges (UAC mechanism) ; therefore, you have no rights to write into the Windows directory or into the "Program Files" directory.
In this case, Windows writes your ".INI" file into another directory: it is called "File virtualization". The following directory is used by Windows: "C:\Users\<LOGIN>AppData\Local\VirtualStore\Windows\". For more details, see UAC mechanism.
To avoid having this problem, we advise you to write the ".INI" file of your application into a different directory. You can use the application common directory (returned by SysDir).
The administrator privileges can also be granted to your application (by including a manifest when creating the executable).
Caution: If several applications share the same .INI file, these applications must use the same "Administrator" privileges or the ".INI" file must be found in a directory accessible by the different applications.

I have created a context-sensitive help in hlp format. This help does not start in Vista/7/8. How to proceed?

At this time, Windows Vista (and later) contains no launcher for starting the help in Hlp format (WinHelp32.exe). The help files in HLP format cannot be used in Windows Vista (and later).
A version of this program for Windows Vista can be downloaded from the download center of Microsoft site.
Minimum version required
  • Version 11
Comments
Click [Add] to post a comment

Last update: 08/31/2022

Send a report | Local help