/build/static/layout/Breadcrumb_cap_w.png

Powershell and Registry Entries?

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

Answers (1)

Posted by: anonymous_9363 13 years ago
Red Belt
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)
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