Jump to content
Sign in to follow this  
jp10558

Windows 7 x64 and FileInstall to Program Files...

Recommended Posts

jp10558

Is there anything special I should know besides doing as Admin a FileInstall command on Win7 x64? I ask because I've got some code to install OCSNG Agent and it's not installing the CACERT.pem file when it does on XP SP3 and XP x64...

FileInstall("E:\Distribution\OCSNG_Agent\OCSNG_WINDOWS_AGENT_4061\OcsAgentSetup.exe","C:\TEMP\OcsAgentSetup.exe",1)
RunWait(@ComSpec & " /c " & '"C:\TEMP\OcsAgentSetup.exe /hkcu /UPGRADE /NOSPLASH /S /NP /DEBUG /SERVER:assets"',"",@SW_HIDE)
FileInstall("E:\Distribution\OCSNG_Agent\cacert.pem", @ProgramFilesDir & "\OCS Inventory Agent\cacert.pem")
Run(@ComSpec & " /c " & 'ocsinventory.exe /hkcu /S /DEBUG  /NP /server:assets /pnum:80', @ProgramFilesDir & "\ocs inventory agent", @SW_HIDE)

The file is in the source location, and at least on XP the RunWait works fine for the install and then goes after the install and drops the cacert.pem which is necessary for the app to work right.

Is there some permissions issue? I've disabled UAC and tried and still no go, but I can manually copy the file in...

Share this post


Link to post
Share on other sites
Richard Robertson

Do you have a 32 bit or 64 bit AutoIt executable? 32 bit applications get routed to Program Files (x86).

Share this post


Link to post
Share on other sites
jp10558

Do you have a 32 bit or 64 bit AutoIt executable? 32 bit applications get routed to Program Files (x86).

Sorry, the app is 32 bit as well, so they both should end up I would think in C:\Program Files (x86)... The autoit is compiled on WinXP SP3, so 32bit for now.

Share this post


Link to post
Share on other sites
Richard Robertson

It was compiled on XP huh, so the certificate should be for sure included...

How about adding code to make sure the directory exists first? Put this line right before the FileInstall.

If Not FileExists(@ProgramFilesDir & "\OCS Inventory Agent") Then DirCreate(@ProgramFilesDir & "\OCS Inventory Agent")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×