I am using a batch file to call a powershell script as such

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File Install_Datatel.ps1

Inside the powershell script I put putty.exe in place and make some shortcuts. I also need to create registry entries to create a custom session, i.e.

New-Item -Path hkcu:\Software\SimonTatham\PuTTY\Sessions\Datatel | out-null
New-ItemProperty -Path hkcu:\Software\SimonTatham\PuTTY\Sessions\Datatel -Name "Protocol" -PropertyType String -Value "ssh" | out-null
New-ItemProperty -Path hkcu:\Software\SimonTatham\PuTTY\Sessions\Datatel -Name "TerminalType" -PropertyType String -Value "xterm" | out-null
New-ItemProperty -Path hkcu:\Software\SimonTatham\PuTTY\Sessions\Datatel -Name "Font" -PropertyType String -Value "Lucida Console" | out-null

When I run the batch file manually, it does everything as expected.

When I deploy the batch, script and files to my test system, it will put all files and shortcuts in place, but does not add the registry entries.

Has anybody created registry entries as part of a K1000 software deployment? What could be stopping it in this case?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
What could be stopping it in this caseAlmost certainly the K1000 executes in the context of the local System user. Your registry entries are therefore ending up in that user's profile (%SystemRoot%\system32\config\systemprofile).

To get user-level registry values written, you'll need to either create a user-level feature (if the installer is MSI-driven) to trigger self-healing (masses in the archives on this) or use Active Setup (again, details are in the archives)
Answered 08/27/2011 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity