Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Windows 8 Errors


1 reply to this topic

Sandor1990

Sandor1990
  • Full Members
  • 33 posts

Posted 20 February 2013 - 15:56

Hey guys,

I've created a BASIC MSI project, which works without any problems under windows xp and 7 (32 and 64 bit). But I got several problems running it on a windows 8 machine.

FYI: The setup needs to be run with administrative rights. I've tested it on a windows 8 virtual machine (64 bit) with UAC (level: standard).
At the end of the setup a script is called to create a desktop shortcut of my application. This should also happen on windows 8 machines (although the desktop has a different meaning there). The script works perfectly under earlier winodws versions. Below u can see the code to create that shortcut:

CODE

function CreateShortcut_Desktop(hMSI)
STRING szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath;
STRING szProgramDir, szPathToExe;
NUMBER nIcon, nBufferSize;
begin
nBufferSize = MAX_PATH;
MsiGetProperty(ISMSI_HANDLE,"SETUPEXEDIR",szPathToExe,nBufferSize);

if(FoundExe(hMSI)) then
szProgramDir = FOLDER_DESKTOP;
szItemName = "My Shortcut";
nIcon = 0;
szCommandLine = "\"" + szPathToExe + "\\..\\MyApplication.exe\"";
szWorkingDir = szPathToExe + "\\..\\";  
szIconPath = szPathToExe + "\\..\\MyApplication.exe";

AddFolderIcon(szProgramDir, szItemName, szCommandLine, szWorkingDir, szIconPath,0,"",REPLACE);
else
MessageBox(@IDS_ERROR_COULDNT_FIND_MYAPPLICATION, INFORMATION);
endif;
end;


When running the stup with the first user created on the windows 8 machine (this user is the admin and is in group administrators), I get the following effects:
- a working shortcut is created on the desktop
- a second shortcut is created as tile on the windows 8 start screen in metro style. But this shortcut doesn't work. It points to C:\MyApplication.exe (where my application isn't installed to). Does anybody know how to avoid this shortcut on the windows 8 start screen? Or how to make it run (so it actually points to the location where my application is stored)?

Next issue when running the setup with a second user (which is also in the adminitrator's group, but is not the user 'administrator'):
- no shortcut is created. Does windows 8 prohibit (due to UAC) to run scripts?

I'm looking forward to any answers of you!

Cheers,
Sand0r

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 February 2013 - 16:43

see my reply in the German forum
http://forum.install...topic=21330&hl=