Jan 26, 2015
10:14 AM
MarkusLatz wrote: You can try to write a little VBA (i.e. office or something else you have) and test the WIN API function. Declare Function DeletePrinterDriver Lib "winspool.drv" Alias "DeletePrinterDriverA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pDriverName As String) As Long There you can check if it in principle work for your case. regards Markus Hi Markus, I'm also having problems with OpenPrinter, could you give me some pointer is what the VBS would look like to check I get a return value for this?
... View more
Jan 26, 2015
08:36 AM
MichaelU wrote: See the help topic Exception Handling, and on the Err Object. When you catch an exception, you can examine the properties on the Err object for possible additional information. Thanks for that it's not too helpful though, no matter what I change I get the same error, I also get the same with OpenPrinter Call as well; prototype BOOL SETUPAPI.DeletePrinterDriverW(c WPOINTER, //_In_ LPTSTR pName, WPOINTER,//_In_ LPTSTR pEnvironment, WSTRING //_In_ LPTSTR pDriverName ); prototype BOOL SETUPAPI.OpenPrinterW( WSTRING, //_In_ LPTSTR pPrinterName, NUMBER,//_Out_ LPHANDLE phPrinter, WPOINTER//_In_ LPPRINTER_DEFAULTS pDefault ); c try OpenPrinterW(szDriverName, Printer, NULL); catch Err = GetLastError(); SprintfBox (INFORMATION, "L862Error","Error occured: %i\n\n%s\n\n%s", Err.Number, Err.Description, Err.LastDllError); endcatch; MessageBox("Open Printer - Complete", WARNING); MessageBox("DeletePrinterDriverW - Starting", WARNING); try if( DeletePrinterDriverW(NULL,NULL,szDriverName) = 0 ) then MessageBox(FormatMessage(Err.LastDllError), WARNING); Err = GetLastError(); SprintfBox( INFORMATION, "CustomAction: RegisterDriverINF", "DeletePrinterDriverA Failed: %s",Err); endif; catch SprintfBox (INFORMATION, "Error","Error occured: %i\n\n%s\n\n%s", Err.Number, Err.Description, Err.LastDllError); endcatch; I always get a -2147219709 error so unable to run any of these functions, its especially weird as I can run the following two API's ok prototype BOOL SETUPAPI.SetupCopyOEMInfA( // ASCII Version From SetupAPI.h POINTER, //IN PCSTR SourceInfFileName, POINTER, //IN PCSTR OEMSourceMediaLocation, OPTIONAL POINTER, //IN DWORD OEMSourceMediaType, POINTER, //IN DWORD CopyStyle, BYREF STRING, //OUT PSTR DestinationInfFileName, OPTIONAL POINTER, //IN DWORD DestinationInfFileNameSize, Set MAX_PATH POINTER, //OUT PDWORD RequiredSize, OPTIONAL POINTER //OUT PSTR *DestinationInfFileNameComponent OPTIONAL ); //MSDN api to remove infe file from Magu to /inf and file repo prototype BOOL SETUPAPI.SetupUninstallOEMInfA( POINTER, // PCWSTR InfFileName, NUMBER, // _In_ DWORD Flags, POINTER //_In_ PVOID Reserved ); And yes I've tried OpenPrinterA and DeletePrinterDriverA in teh same format as the OEMSetups, same error. V.Strange!! Any Idea's?
... View more
Jan 26, 2015
03:20 AM
MichaelU wrote: Since InstallShield 2011 or so, we will default to using Unicode entry points when available. Because of this, you should either specify DeletePrinterDriverA, or use WSTRING and/or WPOINTER types to correspond to LPTSTR / LPCTSTR (or of course LPWSTR / LPCWSTR) parameters. I would start with that, and if that doesn't help, also consider seeing if you can get further information with a try/catch block. How would I execute a try and catch block as none of the suggestions you've offered here seem to work?
... View more
Jan 23, 2015
05:12 AM
Hi, I wonder if someone could help, I'm having trouble porting an msdn function into my installscript; Im attempting to use the DeletePrinterDriver function; https://msdn.microsoft.com/en-us/library/windows/desktop/dd183545(v=vs.85).aspx When I run it I get a setup interrupted and the function never completes and moves on to the next call so I know there must be something fundamentally wrong here. My typedef looks like; prototype BOOL SETUPAPI.DeletePrinterDriver( POINTER, //_In_ LPTSTR pName, POINTER,//_In_ LPTSTR pEnvironment, BYREF STRING //_In_ LPTSTR pDriverName ); And my code looks like this; function del_swi_DeletePrinterDriver(hMSI) STRING szDriverName; begin szDriverName = "Canon iR C2880/C3380"; if( DeletePrinterDriver(NULL,NULL,szDriverName) = 0 ) then MessageBox(FormatMessage(Err.LastDllError), WARNING); Err = GetLastError(); SprintfBox( INFORMATION, "CustomAction: RegisterDriverINF", "SetupCopyOEMInfA Failed: %s",Err); endif; MessageBox("Function Delete Driver - Complete", WARNING); end; It compiles ok however every-time I run it I get the following error; CustomAction del_swi_DeletePrinterDriver returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) Action ended 11:01:23: del_swi_DeletePrinterDriver. Return value 3. This isn't very helpful. I'm already successfully using the SetupUninstallOEMInfA, SetupCopyOEMInfA functions in the same manner but can't work out why this isn't working and the error messages aren't v.helpful, anyone have any suggestions??? Thanks in advance
... View more
- Tags:
- msdn function call.
Labels
- Labels:
-
InstallShield 2014
Jan 14, 2015
05:51 AM
Hi, I'm creating a Basic MSI project, on uninstall I need to delete some installed dll's, however to do this I need to start/stop the spooler, I can do this in install script using; ServiceStopService("Spooler"); ServiceStartService("Spooler", ""); At present I have added a Delay(5); after each command before attempting to remove the files, however it can take longer or even be faster for the spooler to start on stop dependent on each users system, is there a way for me to check that the spooler has in fact been stopped or started before continuing execution of the script? Many thanks in advance
... View more
Labels
- Labels:
-
InstallShield 2014
Jan 06, 2015
09:30 AM
MichaelU wrote: Create a Control Event named like [PROPERTY] - that is with square brackets around the name of the property you want to set. You can see an example on the Next button of the CustomSetup dialog. Many thanks, is the mouseover image show/hide possible?
... View more
Jan 06, 2015
06:04 AM
Hi, Is it possible to set a PushButton Event which will set an MSI property in an Basic MSI project? Also can you hide/show and image on mouse over of a PushButton again in an Basic MSI project? Been trying stuff for hours with little success so any help would be much appreciated. Cheers
... View more
Labels
- Labels:
-
InstallShield 2014
Dec 22, 2014
11:13 AM
Hi, I have Install shield Premier Edition with Virtualization Pack, is it possible to Add English (United Kingdom) to the setup Languages, I have English Unitde States but would like UK to be my default? Thanks in advance
... View more
Labels
- Labels:
-
InstallShield 2014
Nov 18, 2014
10:29 AM
MichaelU wrote: It looks like you have a slight misunderstanding about the InstallScript programming language. The error you received indicates that it's treating printui as the name of a variable. If you want to treat it as (part of) the name of a file, it must be turned into a string by putting it in quotes. So instead of printui.dll your code should have "printui.dll". But since that's just part of the overall arguments to the program, you'll really need "printui.dll,PrintUIEntry /if /b \"Printer 1\" /f \"c:\\windows\\inf\\oem12.inf\" /r \"Lpt1:\" /m \"Printer 1\" /z /u" instead (note the embedded quotes that are escaped by backslashes). Note that I haven't verified the command itself; I've just tried to convert what you posted into something that the InstallScript compiler will understand. If I wanted to place a string variable as a replacement to c:\\windows\\inf\\oem12.inf would I put in in ' ' i.e. '\szDestinationInfFileName' as I can't get the compiler to like any combination tried double quotes, &&.?
... View more
Nov 18, 2014
07:52 AM
Hi, I'm having trouble getting setting up a custom install script in a Basic MSI project, I want to be able to run the following cmd line command in installscript; C:\Windows\SysWOW64\rundll32 printui.dll,PrintUIEntry /if /b "Printer Name" /f "c:\\windows\inf\oem12.inf" /r "Lpt1:" /m "Printer Name" /z /u; I'm able to get make this work from the command line however whenever I try my LaunchApplication function it fails, I'm currently putting this as my LaunchApplication function; LaunchApplication( WINSYSDIR64^"rundll32.exe", printui.dll,PrintUIEntry /if /b "Printer 1" /f "c:\\windows\inf\oem12.inf" /r "Lpt1:" /m "Printer 1" /z /u, WINSYSDIR64, SW_HIDE, LAAW_OPTION_USE_SHELLEXECUTE, LAAW_OPTION_SHOW_HOURGLASS); When compiling I get printui: undefined identifier. Am I barking up the wrong tree and is it even possible as a custom install script action? I can make it work as a custom action -> New EXE - Stored in a binary table, however I have lots of these I wish to add so would like to do it in script. Any help would be much appreciated. Thanks in advance.
... View more
- Tags:
- cust
Labels
- Labels:
-
InstallShield 2014
Oct 06, 2014
10:49 AM
Hi, I've think I've tried every combination of syntax to get to a Pre-defined variable path and can't seem to find it, Im creating a basic MSI Project and have an install script within it, I'm attempting to use the CommonFilesFolder; szDriversPath = [COMMONFILESFOLDER]"Test\\driver000"; So far I've tried loads of combinations and failed with a "[ is missing error", could someone help me get the right syntax for this please? I've tried; szDriversPath = "Test\\driver000"; szDriversPath = [CommonFilesFolder]"Test\\driver000"; szDriversPath = ^ "Test\\driver000"; szDriversPath = @ ^ "Test\\driver000"; Anyhelp would be greatly appreciated.
... View more
Labels
- Labels:
-
InstallShield 2014
Sep 10, 2014
05:25 AM
Hi, I have an Advanced UI project and I want to pass three values in an on click event (button) to my install package which is an MSI. I see the set propertyin the on click actions but this won't actually pass the values into the MSI I want to run. Could some give me some suggestions as to how to do this? Cheers
... View more
Labels
- Labels:
-
InstallShield 2014
Sep 01, 2014
10:13 AM
I'm currently using a the professional trial version of Install Shield 2014, in the actual copy are you able to add more than one package to a Advanced UI project?
... View more
Labels
- Labels:
-
InstallShield 2014
Sep 01, 2014
09:10 AM
Hi, I'm unable to add an .exe package to packages in Advanced UI Project when I right click on Packages, I'm only offered the following. Does anyone have any idea's why I don't see the .exe option?
... View more
Labels
- Labels:
-
InstallShield 2014
Latest posts by lmilesuk
Subject | Views | Posted |
---|---|---|
1559 | Jan 26, 2015 10:14 AM | |
1559 | Jan 26, 2015 08:36 AM | |
1559 | Jan 26, 2015 03:20 AM | |
2827 | Jan 23, 2015 05:12 AM | |
1815 | Jan 14, 2015 05:51 AM | |
833 | Jan 06, 2015 09:30 AM | |
1348 | Jan 06, 2015 06:04 AM | |
1597 | Dec 22, 2014 11:13 AM | |
1169 | Nov 18, 2014 10:29 AM | |
2809 | Nov 18, 2014 07:52 AM |
Activity Feed
- Posted Re: DeletePrinterDriver MSDN Function on InstallShield Forum. Jan 26, 2015 10:14 AM
- Posted Re: DeletePrinterDriver MSDN Function on InstallShield Forum. Jan 26, 2015 08:36 AM
- Posted Re: DeletePrinterDriver MSDN Function on InstallShield Forum. Jan 26, 2015 03:20 AM
- Posted DeletePrinterDriver MSDN Function on InstallShield Forum. Jan 23, 2015 05:12 AM
- Tagged DeletePrinterDriver MSDN Function on InstallShield Forum. Jan 23, 2015 05:12 AM
- Posted Wait till spooler is Started/Stopped on InstallShield Forum. Jan 14, 2015 05:51 AM
- Tagged Wait till spooler is Started/Stopped on InstallShield Forum. Jan 14, 2015 05:51 AM
- Tagged Wait till spooler is Started/Stopped on InstallShield Forum. Jan 14, 2015 05:51 AM
- Tagged Wait till spooler is Started/Stopped on InstallShield Forum. Jan 14, 2015 05:51 AM
- Tagged Wait till spooler is Started/Stopped on InstallShield Forum. Jan 14, 2015 05:51 AM
- Posted Re: PushButton Event - SetMsiPropery on InstallShield Forum. Jan 06, 2015 09:30 AM
- Posted PushButton Event - SetMsiPropery on InstallShield Forum. Jan 06, 2015 06:04 AM
- Posted Is it possible to Add English (United Kingdom) to Languages on InstallShield Forum. Dec 22, 2014 11:13 AM
- Tagged Is it possible to Add English (United Kingdom) to Languages on InstallShield Forum. Dec 22, 2014 11:13 AM
- Tagged Is it possible to Add English (United Kingdom) to Languages on InstallShield Forum. Dec 22, 2014 11:13 AM
- Posted Re: Custom Action: Launch Application Rundll32 printui on InstallShield Forum. Nov 18, 2014 10:29 AM
- Posted Custom Action: Launch Application Rundll32 printui on InstallShield Forum. Nov 18, 2014 07:52 AM
- Tagged Custom Action: Launch Application Rundll32 printui on InstallShield Forum. Nov 18, 2014 07:52 AM
- Posted Predefined Variable - Incorrect Syntax CommonFilesFolder on InstallShield Forum. Oct 06, 2014 10:49 AM
- Tagged Predefined Variable - Incorrect Syntax CommonFilesFolder on InstallShield Forum. Oct 06, 2014 10:49 AM