Installing files to system32 on 64 bit OS

Got a problem you cannot solve? Try here.
Post Reply
pb_man
Posts: 6
Joined: Wed Sep 19, 2012 1:54 pm

Installing files to system32 on 64 bit OS

Post by pb_man »

I'm evaluating IA for my company and running into the issue with trying to copy files to the windows\system32 directory on a 64 bit OS. I have read the forum and information about the Set 64 bit Mode, but so far I'm still not able to get this to work. I'm hoping that I've made a simple coding error and that someone can ID my issue.

Code: Select all

If Variable ISWINDOWS64BIT Equals TRUE
  Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
  Get Common Folder Location System->System Directory into SYSTEMDIR
  Install Files C:\code\library\file.sys to $SYSTEMDIR$\drivers
I have a watch set on the SYSTEMDIR variable and can see that it is getting set to c:\windows\system32, but the install still copies the files to the C:\Windows\SysWOW64 directory.

Any thoughts?
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

Re: Installing files to system32 on 64 bit OS

Post by Adam »

Hi Pb_man

AFAIK you don't need to Get the common folder again. In mine I have something like the below in various places:

Code: Select all

if Variable OS64 Equals TRUE
  Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
end

*** system32 commands here

if Variable OS64 Equals TRUE
  Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end

*** Now you're back to SysWoW64
Also just a word of warning, I had quite a few problems with copy and pasting as every command has a GUID and some appear to copy the GUID. You're much better off typing the command again. Some seem to be fine but others cause a problem. It might be that if you've copy and pasted the command it's not executing it properly at run time.
pb_man
Posts: 6
Joined: Wed Sep 19, 2012 1:54 pm

Re: Installing files to system32 on 64 bit OS

Post by pb_man »

I'm having terrible luck with this install. I have resorted to creating a .bat file to copy the .sys files to the directory after the install completes, but even that isn't working. I can run the .bat file manually, without elevated priviledges, and it works fine, but running it through IA, after the install is complete, it does nothing.

I know I can get this to work in the competitors software, but that brings its own frustrations which is why we're evaluating IA, but if we can't get something this simple to work, I don't see us switching.

Any other ideas? Is there something else I'm missing?
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Installing files to system32 on 64 bit OS

Post by FrancescoT »

Dear User,

can you post a very minimal project that replicates your issue?

Post the project in compressed form including all the files used with it and include a brief description on what exactly is your target.

Of course I will have a look as possible.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pb_man
Posts: 6
Joined: Wed Sep 19, 2012 1:54 pm

Re: Installing files to system32 on 64 bit OS

Post by pb_man »

Here's a copy of this sample install. The install needs to copy 2 system files to the windows\system32 folder so that a legacy program may use these later. My problem is getting these files to copy to the folder in a 64 bit environment.

Originally the code called a separate script (now commented out) and tried to use the Set x64 command to force the winsysdir variable to = windows\system32, but even with this command, my files were still copied to the syswow64 directory.

I then tried installing the files to the targetdir and then using the copy function to copy the files to the system32 directory after the install was applied, but this too did not work.

Now the code is calling a .bat file after the setup completes that will copy the files to the system32 directory if the install is on a 64 bit OS. I have run the batch file manually on the test machine and it copies the files without a problem, but if the .bat is called from IA, the files are not copied.

I'm open to any suggestions for how to get these files into the system32 directory on the 64 bit OS. Any suggestions you have are appreciated.

thanks.
Attachments
IA_DemoServerSetup.zip
(1.3 MiB) Downloaded 878 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Installing files to system32 on 64 bit OS

Post by FrancescoT »

Dear User,

Please use the attached project ... it should work now.

I have modified the "Code Region Define Setup Globals" ... so have a look of what I have done to correctly retrive the appropriate SYSDIR.


Note that I have commented out all your install File calls, due the fact that you didn't sent the files used by the project.
I have used a Message box to show which is the current used SYSDIR during installation.
I have also removed some file from support dir, because as above you didn't sent these files.

Please note, if you add Net runtimes 3.51 you must add 2.0 version otherwise runtimes installation could fails on some x86 OS targets.

I also suggest you to have a look to "Set 64 Bit Mode" command documentation available with InstallAware.

Regards
Attachments
IA_DemoServerSetup.zip
(1.23 MiB) Downloaded 1011 times
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
pb_man
Posts: 6
Joined: Wed Sep 19, 2012 1:54 pm

Re: Installing files to system32 on 64 bit OS

Post by pb_man »

I appreciate the help. I have enjoyed the IA features and layout that I've worked with so far, and learning how to get past this issue will help our evaluation.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Installing files to system32 on 64 bit OS

Post by FrancescoT »

I'm always happy to help.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply