problems launching lpksetup.exe on Windows 7 64 bit Computers

Started by hendersoncd, August 22, 2013, 11:28:16 AM

Previous topic - Next topic

hendersoncd

I have written a piece of software that installs the OS language packs for Windows 7.  The code is below.
On 32 bit Windows 7 computers, the Run or Runwait statement that I use to launch lpksetup.exe works just fine.  However on 64 bit computers, when I use run or runwait, it comes back with the error that it is unable to find or launch the file.  I have verified the files location several time.  Any ideas?

gte = dirHome()
gtf = strcat (gte, "LangPack.ini")
htc = Inireadpvt ("Selection", "Language", "Error No Language Pack Found", gtf)
htd = Inireadpvt ("Selection", "Pack", "Error No Language Pack Found", gtf)
vtVariable1 = htc
MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`Language Pack Installer`
MyDialogX=044
MyDialogY=101
MyDialogWidth=296
MyDialogHeight=075
MyDialogNumControls=005
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,128|128|255`
MyDialogConfig=0

MyDialog001=`009,055,036,012,PUSHBUTTON,"PushButton_OK",DEFAULT,"Continue",1,10,32,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`247,055,036,012,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",2,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`003,003,286,012,STATICTEXT,"StaticText_1",DEFAULT,"This Installer will install the following Language Pack for Windows",DEFAULT,30,512,"Microsoft Sans Serif|6656|40|34",DEFAULT,DEFAULT`
MyDialog004=`003,033,286,018,STATICTEXT,"StaticText_2",DEFAULT,"This installation will require a Restart of your computer.  Please close any open applicationd before clicking Continue.",DEFAULT,40,512,"Microsoft Sans Serif|6656|40|34",DEFAULT,DEFAULT`
MyDialog005=`117,019,074,012,VARYTEXT,"VaryText_1",vtVariable1,"Error Finding Language Pack",DEFAULT,50,512,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")
If ButtonPushed==2 then Exit
Title = "Installing"
Msg = "Operating System Language Pack is Installing.  Please be patient."
BoxOpen(Title, Msg)
lpk = "C:\Windows\System32\lpksetup.exe"
parm1 = "/i "
parm2 = htd
parm3 = " /s /f /p "
parm4 = strcat(gte, htd)
parmfin = strcat (parm1, parm2, parm3, parm4)
RunWait (lpk, parmfin)
Message("Installation Complete", "Please reboot your computer for the changes to take effect.")
Exit

td

Looks like a 64-bit file redirection so change
Code (winbatch) Select

lpk = "C:\Windows\System32\lpksetup.exe"

to
Code (winbatch) Select

lpk = "C:\Windows\sysnative\lpksetup.exe"

on your 64-bit system script.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

hendersoncd

I will give it a try and let you know what happened tomorrow.

hendersoncd

The command line change you suggested works perfectly!  Thank you very much.