![]() ![]() If you have constraints for a part, you can create tribal knowledge in Excel to control sales parameters. You can even use some simple code to zoom right into the block you're working on in DraftSight. With Visual Basic for Applications (VBA) in Excel, you can import all block definitions and instances from DraftSight and modify the attributes in Excel itself. Using Visual Basic with Microsoft Excel for Block Managementīlock definitions and instances in DraftSight come with a wealth of information. You can even use Microsoft Excel as a staging ground for manipulating the data and inserting a label and point on a specific layer. This type of file allows you to quickly insert multiple points in DraftSight. A script file in DraftSight is essentially a text file that you rename and save as an SCR file. One way is through scripting, specifically mass import scripting. $Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-ex bypass -file `"C:\ProgramData\CustomScripts\testreg.Automation without Programming: Scripting - Mass ImportĮven if you don't have programming knowledge, you can still automate tasks in DraftSight. $Time = New-ScheduledTaskTrigger -AtLogOn New-ItemProperty "HKLM:\Software\FLEXlm License Manager" -Name "SW_D_LICENSE_FILE" -Value -PropertyType STRING -FilePath $(Join-Path $env:ProgramData CustomScripts\testreg.ps1) -Encoding unicode -Force -InputObject $content -Confirm:$false ![]() #Start-Process -Wait -NoNewWindow "msiexec" -ArgumentList "/i","$pwd\DraftSight.msi","/qb","LICENSETYPE=3" $content = (Get-ItemProperty "HKLM:\Software\FLEXlm License Manager").SW_D_LICENSE_FILE Of course, I skipped the msi part but I this something you could use? UPDATE 14:05: The registry keys were succefully created. I uploaded the app just a few seconds ago,first I need to spin up a clean windows 10 test vm. Just like i I did with a win32 app to disable the oobe stage (for when you don't use autopilot) You could create something like this and convert it (with the msi) to a intunewin file Thanks in advance for your donated brain power. I hope someone can point me to a solution. Running the scripts as local admin on the PC works off course. Which does not even write to HKEY_LOCAL_MACHINE\SOFTWARE\Test or HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Test. New-ItemProperty Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Test\ -Name "testproperty" -Value 'testvalue0000' -PropertyType STRING -Force New-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\ -Name "Test" -Force ![]() Same outcome, powershell is forced to 32 bit mode. I tried to use 64bit powershell to start the program: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File registry.ps1 I have found few articles for using SysNative, but that is not present in Windows 10 anymore ![]() I was searching the web for few days now and i am not able to find a solution. New-ItemProperty "HKLM:\Software\FLEXlm License Manager" -Name "SW_D_LICENSE_FILE" -Value -PropertyType STRING -Force New-Item -Path "HKLM:\Software" -Name "FLEXlm License Manager" -Force Start-Process -Wait -NoNewWindow "msiexec" -ArgumentList "/i","$pwd\DraftSight.msi","/qb","LICENSETYPE=3" $flexreg = (Get-ItemProperty "HKLM:\Software\FLEXlm License Manager").SW_D_LICENSE_FILE If solidworks is not installed key and value is created: If solidworks is installed, license server registry entry is added, if not present. However when trying to read current registry and create new, or modify existing values i am not able to read/write the registry due to powershell running in 32bit mode and redirected to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Nodeįor Example installing draftsight that uses the same license manager client as solidworks. This is OK when i want to just write keys and values. reg files or adding keys/values in batch or PS using reg.exe with operator /reg:64 For example: I am partially able to go around the issue by importing. Powershell is not accessing 64 bit registry, due to Intune agent running the script in 32 bit mode.įor example when i try to write a key (or value) to HKEY_LOCAL_MACHINE\SOFTWARE\Test, it stores the key in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Test However i found an issue with PowerShell installations, that i am not able to overcome. Coming from SCCM to Intunes i started to recreate Application packages, with installers based on MSI, Batch, EXE and PowerShell. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |