PDA

View Full Version : Ho can i Run A Exe File After The uninstall



arun
04-18-2011, 11:11 PM
Hi All,

Iam New To sb7.

My application contain a database when i install my application in windows 7 and vista my database file goes to appdata/local/virtualstore/programfiles/myappnamefolder.
i Writed A Program For Deleting This Folder ("myappnamefolder") in c# and build a output exe. i want to execute this exe file when uninstallation finished

How Can I Execute This File In Sb7?

Can You Help Me?

Arunkumar
:)

linder
04-18-2011, 11:49 PM
Arunkumar,

You can use the "Run Program..." or "Run Command Line..." script functions to launch programs from a "custom uninstall" include script.

But please note that the Virtual Store is a feature of User Account Control and the Virtual Store is a hall of shame! "Legacy" (non-UAC-aware) applications that try to write to protected system locations (e.g. the Program Files folder tree, the Windows folder tree, and HKEY_LOCAL_MACHINE in the registry) are prevented from doing so. Instead, a compatibility feature kicks in, and these applications write to a location in your per-user directory. Registry entries are written to a special area in HKEY_CURRENT_USER. The "legacy" application mostly won't know the difference, though there are limitations and you can get strange results. For example, if an application deletes a file from the virtual store when a file of the same name exists in the real location, the delete appears to succeed but the file still exists. Virtualization also fails (by design) if the application is run under another user account, or using "Run as Administrator". The files written to the first user's virtual store are invisible to these other users.

Virtualization is disabled if an application is UAC-aware!

To cut a long story short, you can't access the virtual store from an UAC-aware elevated running application.

BTW, if your own application created the files and folders in the virtual store, then your app is not UAC-aware (and on top of this, writes to the Program Files folder). #1 priority should be to make it UAC-aware and Win7-compliant.

Does this help?

Friedrich