Jump to content

Problem with Windows install script...

DRAGONPASS
Go to solution Solved by DRAGONPASS,

Solved it by myself/ found a workaround:

The shortcut creation into Public Desktop was the only part that didn't work without admin privileges (program files were already placed in a unresticted directory).

So I rebuilt the install script, so that the shortcut is only created for the current user and added functionality that only the user shortcut is created when the program files already exists.

So now the same install script can be run for every user, but just the shortcut is created, when the progam files are already installed.

Problem solved 馃檪

Hi there,

I've scripted a install script for a little javafx application I developed myself.

Now the install script is working fine when I'm logged on with the Administrator account (Admin rights are necessary because files need to be copied/created in restricted areas e.g. shortcut in the Public Desktop directory).

But when I'm logged on as a simple user and I try to run the script as Administrator, the files can't be copied because the working directory changes to C:\Windows\System32

Now I didn't specify聽 absolute paths for the files that shall be copied, because the script is for a company and I don't know where the initial files will be located.

So the install script fails because the files to copy can't be found.

avoiding this by using "runas" inside the install script isn't a option because then a specific Administrator account needs to be hardcoded.

Any ideas how the initial files can be "found" after the directory has changed? Just running a query for the unpacked file archive seems a bit dirty for me...

Thanks in advance!

Link to comment
Share on other sites

Link to post
Share on other sites

Solved it by myself/ found a workaround:

The shortcut creation into Public Desktop was the only part that didn't work without admin privileges (program files were already placed in a unresticted directory).

So I rebuilt the install script, so that the shortcut is only created for the current user and added functionality that only the user shortcut is created when the program files already exists.

So now the same install script can be run for every user, but just the shortcut is created, when the progam files are already installed.

Problem solved 馃檪

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now