PDA

View Full Version : Installing to Desktop Bad



NewsArchive
05-09-2018, 01:34 AM
I don't know why, but some people just insist on installing the program
into the desktop folder. Is there a way I can prevent that. I give them
an option to change the folder, but after that, I want to check to see
that 'desktop' is not in the path.. and if it is, circle back to the
prompt that asks where to install it with my original default.

What would be the best way to handle this?
Thanks,

--
Ray Rippey
VMT Software

NewsArchive
05-09-2018, 01:35 AM
Try something like this

! The Wizard Loop displays the dialog screens that the user sees in the
installation
Set Variable %_INSTALL_ERROR% to "0"
Loop Wizard (Abort Dialog Active)
If %_SB_INSTALLDIR% Contains "%_CSIDL_PROGRAM_FILES%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_DESKTOP%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_PERSONAL%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_APPDATA%" Then
Set Variable %_INSTALL_ERROR% to "1"
End

If %_INSTALL_ERROR% Equals "1" Then
Set Variable %_INSTALL_ERROR% to "0"
Display Message Box ("Stellar kan ikke installeres i denne
mappe\n\n", "Vælg en anden mappe")
Set Variable %_SB_INSTALLDIR% to "[INSTALLDIR]"
Cycle Loop
End
End



/Michael

NewsArchive
05-10-2018, 02:31 AM
Thanks.. I'll give it a try.
Ray