How to get Registry data using Photoshop script

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

irov

How to get Registry data using Photoshop script

Post by irov »

Is it possible to get Windows registry data using Photoshop script?

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Paul MR

How to get Registry data using Photoshop script

Post by Paul MR »

Yes but you would need to use VB to get the information. It could be written to a file and then read in.
I am not good with Vb but here is an example of Photoshop CS5 application path sent to a windows message box.
No error checking has been done.

Code: Select allvar VBFile = File(Folder.temp + "/v.vbs");
if(VBFile.exists) VBFile.remove();
VBFile.open('w');
var VB =
'Option Explicit\r' +
'Dim objRegistry, Key, Info,fso\r' +
'Set fso = CreateObject("Scripting.FileSystemObject")\r' +
'Set objRegistry = CreateObject("Wscript.shell")\r' +
'Info = ReadReg("HKLM\\SOFTWARE\\Adobe\\Photoshop\\12.0\\ApplicationPath")\r' +
'MsgBox(Info)\r' +
'Function ReadReg(RegPath)\r' +
'Set objRegistry = CreateObject("Wscript.shell")\r' +
'Key = objRegistry.RegRead(RegPath)\r' +
'ReadReg = Key\r' +
'End Function\r'
VBFile.write(VB);
VBFile.close();
VBFile.execute();

larsen67

How to get Registry data using Photoshop script

Post by larsen67 »

Paul, what is this windows registry stuff you are getting n what it do?
Paul MR

How to get Registry data using Photoshop script

Post by Paul MR »

The registry is the heart of the windows system, it holds information on installed programs and settings, OS settings and can be used to store your own variables. If the registry gets corrupted your system is hosed.
larsen67

How to get Registry data using Photoshop script

Post by larsen67 »

TVM Paul, I kind of guessed along those lines… PC vooboo for me to keep away from me thinks…