/build/static/layout/Breadcrumb_cap_w.png

C:\DOCUMENTS AND SETTINGS

hi

please need some help on this app that I have repackaged using Wise 6.0

this is my problem I need the app to save configuration files to C:\documents and settings\allusers\application data\app folder\app name\app version

but the app is storing the configuration files in C:\documents and settings\ MY Name\ application data\app folder\app name\ app version

I have set the allusers property to 1

is this possible

thanks

0 Comments   [ + ] Show comments

Answers (6)

Posted by: mark_holland21 17 years ago
Fourth Degree Green Belt
0
Hi,

Are you familiar with the following property?

CommonAppDataFolder

This resolves itself to C:\Documents and Settings\All Users\Application Data.

There is also the Property AppDataFolder which resolves to the Current User's App Data folder so this could be where you are going wrong.

You could try using that to install your files in the desired location.

Rgds
Posted by: AngelD 17 years ago
Red Belt
0
I have set the allusers property to 1
Did you use the ALLUSERS (All upper case) property?

How are you installing the package?
manual, sms, AD/GPO (Per User or Per Machine) or something else?
Posted by: cygan 17 years ago
Fifth Degree Brown Belt
0
HI mark_holland

I have not heard of that property will try it out

well the problem is here

after capturing the installation the C:\documents and settings\all users\app data\ shortcut is disabled.

I can't even tick the option to advertise

on the shortcut details page. the command line reads C:\documents and settings\all users\app data\xxxx which is fine

thanks for that will use the property
Posted by: cygan 17 years ago
Fifth Degree Brown Belt
0
thanks angeid

i have set the per machine option


but don't know why it is still installing to the users profile
Posted by: AngelD 17 years ago
Red Belt
0
after capturing the installation the C:\documents and settings\all users\app data\ shortcut is disabled.
This is common when the shortcut don't point to a file in your package.
Go to the Shortcut table and find the Target colum. This will hold the property that holds the target value.
In the Property table find that property. If the property value is pointing to a file in your package then in the Shortcut table set the Component column to the component holding the file and the Target column to the feature holding the component. This should make the shortcut advertised.

If the target file isn't in your package create for example a vbscript that will launch the real target file and any parameter if exist. Add the vbscript as a file to the package and point the vbscript component to the Component table.

Here is an example for a shortcut I did for excel.exe to launch a macro, excel wasn't included in the package of course ;)

On Error Resume Next

If Not CheckRequiredProducts Then
ErrorMessage("""Microsoft Office 2000 SR-1 Professional"" must be installed")

WScript.Quit(0)
End If

Dim sEXCELPATH, sSTARTR32XLA
'// Product "Microsoft Office 2000 SR-1 Professional", Component "Global_Excel_Core"
sEXCELPATH = MsiGetComponentPath("{00010409-78E1-11D2-B60F-006097C998E7}", "{CC29E96F-7BC2-11D1-A921-00A0C91E2AA2}")

'// Product "FDC Control", Component "STARTC32.XLA"
sSTARTR32XLA = MsiGetComponentPath("{C575DABA-8FD5-4937-A832-A188C4BD26C0}", "{F867B2DD-DBDA-4E30-B693-95048B1EBA0C}")

ExecuteProcess("""" & sEXCELPATH & """ -e """ & sSTARTR32XLA & """")

Function CheckRequiredProducts()
Const CA_ERROR_SUCCESS = True
Const CA_ERROR_FAILURE = False
Const msiInstallStateUnknown = -1
Const msiInstallStateAbsent = 2

Dim ProductCode, InstallState, Feature, ComponentId
ProductCode = "{00010409-78E1-11D2-B60F-006097C998E7}"

InstallState = MsiQueryProductState(ProductCode)
If InstallState = msiInstallStateUnknown Then
'// return value
CheckRequiredProducts = CA_ERROR_FAILURE

Exit Function
End If

Feature = "EXCELFiles"
InstallState = MsiQueryFeatureState(ProductCode, Feature)
If InstallState = msiInstallStateUnknown Or InstallState = msiInstallStateAbsent Then
'// return value
CheckRequiredProducts = CA_ERROR_FAILURE

Exit Function
End If

Feature = "ExcelAddinHTMLFiles"
InstallState = MsiQueryFeatureState(ProductCode, Feature)
If InstallState = msiInstallStateUnknown Or InstallState = msiInstallStateAbsent Then
'// return value
CheckRequiredProducts = CA_ERROR_FAILURE

Exit Function
End If

'// return value
CheckRequiredProducts = CA_ERROR_SUCCESS

Exit Function
End Function

Function MsiQueryProductState(ProductCode)
Dim InstallState

Dim Installer : Set Installer = Nothing
Set Installer = CreateObject("WindowsInstaller.Installer")
InstallState = Installer.ProductState(ProductCode)

MsiQueryProductState = InstallState

Exit Function
End Function

Function MsiQueryFeatureState(ProductCode, Feature)
Dim InstallState

Dim Installer : Set Installer = Nothing
Set Installer = CreateObject("WindowsInstaller.Installer")
InstallState = Installer.FeatureState(ProductCode, Feature)

MsiQueryFeatureState = InstallState

Exit Function
End Function

Function MsiGetComponentPath(ProductCode, ComponentId)
Dim ComponentPath

Dim Installer : Set Installer = Nothing
Set Installer = CreateObject("WindowsInstaller.Installer")
ComponentPath = Installer.ComponentPath(ProductCode, ComponentId)

MsiGetComponentPath = ComponentPath

Exit Function
End Function

Function ErrorMessage(Message)
Const vbCritical = 16

MsgBox Message, vbCritical, "Error Information"
End Function

Function ExecuteProcess(sCommand)
Const iWindowStyle = 1
Const bWaitOnReturn = False

Dim WshShell : Set WshShell = Nothing
Set WshShell = CreateObject("WScript.Shell")

WshShell.Run sCommand, iWindowStyle, bWaitOnReturn
End Function
Posted by: cygan 17 years ago
Fifth Degree Brown Belt
0
thanks once again angeid for the script
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ